From e382bc649b95aa2ab6e86d60b0520236b2bf2947 Mon Sep 17 00:00:00 2001 From: Stanimir Varbanov Date: Fri, 27 May 2016 01:10:37 +0300 Subject: gallium: push offset down to driver Push offset down to drivers when importing dmabuf. This is needed to more fully support EGL_EXT_image_dma_buf_import when a non-zero offset is specified. Tesing has been done for freedreno, and compile tested following gallium drivers: nouveau,svga,virgl,r600,r300,radeonsi,swrast,i915,ilo Signed-off-by: Stanimir Varbanov Reviewed-by: Emil Velikov --- src/gallium/drivers/nouveau/nouveau_screen.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/gallium/drivers/nouveau/nouveau_screen.c') diff --git a/src/gallium/drivers/nouveau/nouveau_screen.c b/src/gallium/drivers/nouveau/nouveau_screen.c index 4ca9e5c06cd..2c421cc748c 100644 --- a/src/gallium/drivers/nouveau/nouveau_screen.c +++ b/src/gallium/drivers/nouveau/nouveau_screen.c @@ -89,6 +89,12 @@ nouveau_screen_bo_from_handle(struct pipe_screen *pscreen, struct nouveau_bo *bo = 0; int ret; + if (whandle->offset != 0) { + debug_printf("%s: attempt to import unsupported winsys offset %d\n", + __FUNCTION__, whandle->offset); + return NULL; + } + if (whandle->type != DRM_API_HANDLE_TYPE_SHARED && whandle->type != DRM_API_HANDLE_TYPE_FD) { debug_printf("%s: attempt to import unsupported handle type %d\n", -- cgit v1.2.3