aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/svga
diff options
context:
space:
mode:
authorStanimir Varbanov <[email protected]>2016-05-27 01:10:37 +0300
committerEmil Velikov <[email protected]>2016-05-30 10:26:35 +0100
commite382bc649b95aa2ab6e86d60b0520236b2bf2947 (patch)
tree795d03d6c872604a60bcf60b6c0c28ff85630799 /src/gallium/winsys/svga
parent30d28d7c3148a7f7f2244b117ac0158930e95966 (diff)
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 <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/gallium/winsys/svga')
-rw-r--r--src/gallium/winsys/svga/drm/vmw_screen_dri.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/winsys/svga/drm/vmw_screen_dri.c b/src/gallium/winsys/svga/drm/vmw_screen_dri.c
index baa22a90beb..eae678a6358 100644
--- a/src/gallium/winsys/svga/drm/vmw_screen_dri.c
+++ b/src/gallium/winsys/svga/drm/vmw_screen_dri.c
@@ -186,6 +186,12 @@ vmw_drm_gb_surface_from_handle(struct svga_winsys_screen *sws,
uint32_t handle;
int ret;
+ if (whandle->offset != 0) {
+ fprintf(stderr, "Attempt to import unsupported winsys offset %u\n",
+ whandle->offset);
+ return NULL;
+ }
+
ret = vmw_ioctl_gb_surface_ref(vws, whandle, &flags, format,
&mip_levels, &handle, &desc.region);
@@ -253,6 +259,12 @@ vmw_drm_surface_from_handle(struct svga_winsys_screen *sws,
int ret;
int i;
+ if (whandle->offset != 0) {
+ fprintf(stderr, "Attempt to import unsupported winsys offset %u\n",
+ whandle->offset);
+ return NULL;
+ }
+
switch (whandle->type) {
case DRM_API_HANDLE_TYPE_SHARED:
case DRM_API_HANDLE_TYPE_KMS: