mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 06:30:10 +01: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>
This commit is contained in:
parent
1ee884efd7
commit
05e7ac6551
1 changed files with 1 additions and 1 deletions
|
|
@ -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