mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 15:58:05 +02:00
dri: add big-endian 8888 entries to driImageFormatToSizedInternalGLFormat
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:
parent
8f56c51d51
commit
c1f1b704d9
1 changed files with 18 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue