mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 08:40:11 +01:00
st/dri2: implement image offset query
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.stach@pengutronix.de> Reviewed-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
parent
cb577e379e
commit
d6b9ba36a4
1 changed files with 6 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue