Skip to content

Commit 25f569f

Browse files
bl4ckb0neMarge Bot
authored and
Marge Bot
committed
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 <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18673>
1 parent 70e2a1f commit 25f569f

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

src/gallium/frontends/dri/dri_screen.c

+1
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,7 @@ dri_get_egl_image(struct st_manager *smapi,
738738
stimg->format = map ? map->pipe_format : img->texture->format;
739739
stimg->level = img->level;
740740
stimg->layer = img->layer;
741+
stimg->imported_dmabuf = img->imported_dmabuf;
741742

742743
if (img->imported_dmabuf && map) {
743744
/* Guess sized internal format for dma-bufs. Could be used

src/gallium/frontends/wgl/stw_image.c

+1
Original file line numberDiff line numberDiff line change
@@ -140,4 +140,5 @@ stw_translate_image(struct stw_image *in, struct st_egl_image *out)
140140
out->format = in->format;
141141
out->layer = in->layer;
142142
out->level = in->level;
143+
out->imported_dmabuf = false;
143144
}

src/gallium/include/frontend/api.h

+2
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,8 @@ struct st_egl_image
193193

194194
/* one of __DRI_YUV_RANGE_* */
195195
unsigned yuv_range;
196+
197+
bool imported_dmabuf;
196198
};
197199

198200
/**

0 commit comments

Comments
 (0)