cogl/gles: Revert to unsized GL_BGRA as internalformat for BGRA_8888
Using GL_BGRA8_EXT as internalformat for TexSubImage2D was not allowed in the EXT_texture_format_BGRA8888 extension. This changed recently: https://registry.khronos.org/OpenGL/extensions/EXT/EXT_texture_format_BGRA8888.txt 1.4, 23/06/2024 Erik Faye-Lund: Add GL_BGRA8_EXT for ES 2.0 and later. Mesa already supports this which is why7f943613a8
("cogl: Use sized internal renderable formats") worked as intended. Technically spec compliant and our CI had an up-to-date driver. So while this is no bug, it's still not great because older drivers will generate GL errors. This commit changes this specific format back to an unsized internal format which means we could, in theory, get less than 8bpc framebuffers. We can try to revert this commit when newer driver versions have propagated far enough. Fixes:7f943613a8
("cogl: Use sized internal renderable formats") Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3954> (cherry picked from commit45dcfeb0cc
)
This commit is contained in:
parent
d9d3199127
commit
1a09f44c60
1 changed files with 6 additions and 1 deletions
|
@ -268,7 +268,12 @@ _cogl_driver_pixel_format_to_gl (CoglContext *context,
|
|||
if (_cogl_has_private_feature
|
||||
(context, COGL_PRIVATE_FEATURE_TEXTURE_FORMAT_BGRA8888))
|
||||
{
|
||||
glintformat = GL_BGRA8;
|
||||
/* Using the sized internal format GL_BGRA8 only become possible on
|
||||
* 23/06/2024 (https://registry.khronos.org/OpenGL/extensions/EXT/EXT_texture_format_BGRA8888.txt).
|
||||
* When support has propagated to more drivers, we should start
|
||||
* using GL_BGRA8 again.
|
||||
*/
|
||||
glintformat = GL_BGRA;
|
||||
glformat = GL_BGRA;
|
||||
gltype = GL_UNSIGNED_BYTE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue