Skip to content

mesa/st: Use sized internal formats when importing from EGL

Icecream95 requested to merge icecream95/mesa:external-shader-image into main

All non-subsampled formats should now receive a sized internal format, permitting imported textures to be used for shader images.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6277


Turns out there was already code for getting an internal format, so implementing this was easier than expected.

OES_EGL_image_external_essl3 seems to suggest that we should support shader images for all formats, even YUV ones, just without any conversion. I think that the approach taken by this MR makes more sense, but it's only a two line patch to use the alternate method.

This patch also changes the internal format for renderbuffers, just because I saw the code there, but I don't know what utility that serves.

Merge request reports