dri: add big-endian 8888 entries to driImageFormatToSizedInternalGLFormat
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

So that dma-buf-imported EGLImages on big-endian hosts resolve to a
sized GL internal format in st_bind_egl_image() instead of falling
back to unsized GL_RGBA/GL_RGB.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41132>
This commit is contained in:
Pavel Ondračka 2026-04-13 22:42:46 +02:00
parent 8f56c51d51
commit c1f1b704d9

View file

@ -956,6 +956,24 @@ static const struct {
.image_format = __DRI_IMAGE_FORMAT_XBGR8888,
.internal_format = GL_RGB8,
},
#if UTIL_ARCH_BIG_ENDIAN
{
.image_format = PIPE_FORMAT_A8R8G8B8_UNORM,
.internal_format = GL_RGBA8,
},
{
.image_format = PIPE_FORMAT_X8R8G8B8_UNORM,
.internal_format = GL_RGB8,
},
{
.image_format = PIPE_FORMAT_A8B8G8R8_UNORM,
.internal_format = GL_RGBA8,
},
{
.image_format = PIPE_FORMAT_X8B8G8R8_UNORM,
.internal_format = GL_RGB8,
},
#endif
{
.image_format = __DRI_IMAGE_FORMAT_R8,
.internal_format = GL_R8,