This trivially adds support for the image offset query, which is needed for the zwp_linux_dmabuf based EGL platform wayland implementation.
Signed-off-by: Lucas Stach <l.st...@pengutronix.de> --- src/gallium/state_trackers/dri/dri2.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c index 3119a396ce29..b517b9ca8ebb 100644 --- a/src/gallium/state_trackers/dri/dri2.c +++ b/src/gallium/state_trackers/dri/dri2.c @@ -1186,6 +1186,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, -- 2.11.0 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev