[client] egl: fix rgb24 regression

We need the alpha channel for this data type
This commit is contained in:
Geoffrey McRae 2023-11-21 12:20:04 +11:00
parent 43a3fb0db3
commit 22d949c411

View File

@ -38,11 +38,6 @@ bool egl_texUtilGetFormat(const EGL_TexSetup * setup, EGL_TexFormat * fmt)
switch(setup->pixFmt) 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: case EGL_PF_BGRA:
fmt->bpp = 4; fmt->bpp = 4;
fmt->format = GL_BGRA_EXT; fmt->format = GL_BGRA_EXT;
@ -75,6 +70,16 @@ bool egl_texUtilGetFormat(const EGL_TexSetup * setup, EGL_TexFormat * fmt)
fmt->fourcc = DRM_FORMAT_XBGR16161616F; fmt->fourcc = DRM_FORMAT_XBGR16161616F;
break; 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: case EGL_PF_RGB_24:
fmt->bpp = 3; fmt->bpp = 3;
fmt->format = GL_RGB; fmt->format = GL_RGB;