gallium: track if st_egl_image was created by a dmabuf

This is required by GL_EXT_EGL_image_storage to verify if the image is valid

Signed-off-by: Simon Zeni <simon@bl4ckb0ne.ca>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18673>
This commit is contained in:
Simon Zeni 2022-09-19 07:16:49 -04:00 committed by Marge Bot
parent 70e2a1faad
commit 25f569f58a
3 changed files with 4 additions and 0 deletions

View file

@ -738,6 +738,7 @@ dri_get_egl_image(struct st_manager *smapi,
stimg->format = map ? map->pipe_format : img->texture->format;
stimg->level = img->level;
stimg->layer = img->layer;
stimg->imported_dmabuf = img->imported_dmabuf;
if (img->imported_dmabuf && map) {
/* Guess sized internal format for dma-bufs. Could be used

View file

@ -140,4 +140,5 @@ stw_translate_image(struct stw_image *in, struct st_egl_image *out)
out->format = in->format;
out->layer = in->layer;
out->level = in->level;
out->imported_dmabuf = false;
}

View file

@ -193,6 +193,8 @@ struct st_egl_image
/* one of __DRI_YUV_RANGE_* */
unsigned yuv_range;
bool imported_dmabuf;
};
/**