gl: Force U8 textures for U8_SRGB depths

The GL renderer is using FLOAT32 instead of GL_SRGB, which is screwing
up the node-editor by making it turn on high bit depth unconditionally.

So until someone fixes the GL renderer properly, do this quickfix.
This commit is contained in:
Benjamin Otte
2024-07-03 18:52:36 +02:00
parent df46eeafdb
commit 08f90a188c

View File

@@ -455,7 +455,10 @@ gsk_gl_renderer_render_texture (GskRenderer *renderer,
return texture;
}
/* Don't use float textures for SRGB or node-editor turns on high
* depth unconditionally. */
if (gsk_render_node_get_preferred_depth (root) != GDK_MEMORY_U8 &&
gsk_render_node_get_preferred_depth (root) != GDK_MEMORY_U8_SRGB &&
gdk_gl_context_check_version (self->context, "3.0", "3.0"))
{
gdk_format = GDK_MEMORY_R32G32B32A32_FLOAT_PREMULTIPLIED;