From 22d949c4112736e903c343209cbebef443638911 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Tue, 21 Nov 2023 12:20:04 +1100 Subject: [PATCH] [client] egl: fix rgb24 regression We need the alpha channel for this data type --- client/renderers/EGL/texture_util.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/client/renderers/EGL/texture_util.c b/client/renderers/EGL/texture_util.c index 3cda65a9..8f950306 100644 --- a/client/renderers/EGL/texture_util.c +++ b/client/renderers/EGL/texture_util.c @@ -38,11 +38,6 @@ bool egl_texUtilGetFormat(const EGL_TexSetup * setup, EGL_TexFormat * fmt) switch(setup->pixFmt) { - //EGL has no support for 24-bit formats, so we stuff it into a 32-bit - //texture to unpack with a shader later - case EGL_PF_BGR_32: - // fallthrough - case EGL_PF_BGRA: fmt->bpp = 4; fmt->format = GL_BGRA_EXT; @@ -75,6 +70,16 @@ bool egl_texUtilGetFormat(const EGL_TexSetup * setup, EGL_TexFormat * fmt) fmt->fourcc = DRM_FORMAT_XBGR16161616F; break; + //EGL has no support for 24-bit formats, so we stuff it into a 32-bit + //texture to unpack with a shader later + case EGL_PF_BGR_32: + fmt->bpp = 4; + fmt->format = GL_BGRA_EXT; + fmt->intFormat = GL_BGRA_EXT; + fmt->dataType = GL_UNSIGNED_BYTE; + fmt->fourcc = DRM_FORMAT_ARGB8888; + break; + case EGL_PF_RGB_24: fmt->bpp = 3; fmt->format = GL_RGB;