From f0861c803edef82d27ccb3278ac7ab4c4c284272 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Tue, 6 Apr 2021 15:57:26 -0400 Subject: [PATCH] glx: Downgrade sRGB-ful fbconfigs Again, NVIDIA supports this on every fbconfig, Mesa alternates it on and off for some reason but only on some drivers, and in particular llvmpipe doesn't try to create sRGB-ful fbconfigs. Nerf it out of the fbconfig. Acked-By: Mike Blumenkrantz Part-of: --- src/glx/dri_common.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/glx/dri_common.c b/src/glx/dri_common.c index 4577ee4c7ea..f7a1a429a74 100644 --- a/src/glx/dri_common.c +++ b/src/glx/dri_common.c @@ -278,6 +278,18 @@ driConfigEqual(const __DRIcoreExtension *core, } break; + case __DRI_ATTRIB_FRAMEBUFFER_SRGB_CAPABLE: + if (!scalarEqual(config, attrib, value)) { + static int warned; + if (!warned) { + dri_message(_LOADER_DEBUG, + "Disabling server's sRGB support\n"); + warned = 1; + } + config->sRGBCapable = 0; + } + break; + default: if (!scalarEqual(config, attrib, value)) return GL_FALSE;