mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 09:18:04 +02:00
llvmpipe: Take offset into account when importing dmabufs
Which is necessary for many common YCbCr formats. Fixes:d74ea2c117(llvmpipe: Implement dmabuf handling) Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Signed-off-by: Robert Mader <robert.mader@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34240> (cherry picked from commit05e7ac6551)
This commit is contained in:
parent
4aad059de8
commit
558a7d92d5
2 changed files with 2 additions and 2 deletions
|
|
@ -2314,7 +2314,7 @@
|
|||
"description": "llvmpipe: Take offset into account when importing dmabufs",
|
||||
"nominated": true,
|
||||
"nomination_type": 2,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "d74ea2c117fe96e527471e572336f931c3c77da1",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -757,7 +757,7 @@ llvmpipe_resource_from_handle(struct pipe_screen *_screen,
|
|||
_screen->import_memory_fd(_screen, whandle->handle,
|
||||
(struct pipe_memory_allocation**)&alloc,
|
||||
&size, true)) {
|
||||
void *data = alloc->cpu_addr;
|
||||
void *data = (char*)alloc->cpu_addr + whandle->offset;
|
||||
lpr->dt = winsys->displaytarget_create_mapped(winsys, template->bind,
|
||||
template->format, template->width0, template->height0,
|
||||
whandle->stride, data);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue