summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/state_trackers/dri/dri2.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c
index 2402c61bd85..60ec38d8e44 100644
--- a/src/gallium/state_trackers/dri/dri2.c
+++ b/src/gallium/state_trackers/dri/dri2.c
@@ -1179,6 +1179,12 @@ dri2_query_image(__DRIimage *image, int attrib, int *value)
NULL, image->texture, &whandle, usage);
*value = whandle.stride;
return GL_TRUE;
+ case __DRI_IMAGE_ATTRIB_OFFSET:
+ whandle.type = DRM_API_HANDLE_TYPE_KMS;
+ image->texture->screen->resource_get_handle(image->texture->screen,
+ NULL, image->texture, &whandle, usage);
+ *value = whandle.offset;
+ return GL_TRUE;
case __DRI_IMAGE_ATTRIB_HANDLE:
whandle.type = DRM_API_HANDLE_TYPE_KMS;
image->texture->screen->resource_get_handle(image->texture->screen,