summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers/dri2/egl_dri2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/egl/drivers/dri2/egl_dri2.c')
-rw-r--r--src/egl/drivers/dri2/egl_dri2.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index bbc457c8bb0..8e376e32d7c 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -2259,8 +2259,15 @@ dri2_export_dma_buf_image_mesa(_EGLDriver *drv, _EGLDisplay *disp, _EGLImage *im
dri2_dpy->image->queryImage(dri2_img->dri_image,
__DRI_IMAGE_ATTRIB_STRIDE, strides);
- if (offsets)
- offsets[0] = 0;
+ if (offsets) {
+ int img_offset;
+ bool ret = dri2_dpy->image->queryImage(dri2_img->dri_image,
+ __DRI_IMAGE_ATTRIB_OFFSET, &img_offset);
+ if (ret)
+ offsets[0] = img_offset;
+ else
+ offsets[0] = 0;
+ }
return EGL_TRUE;
}