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 <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1648>
This commit is contained in:
Adam Jackson 2021-04-06 15:57:26 -04:00 committed by Marge Bot
parent 6b93746b56
commit f0861c803e
1 changed files with 12 additions and 0 deletions

View File

@ -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;