[Mesa-dev] [PATCH 5/9] glx: don't expose sRGB visuals
Marek Olšák
maraeo at gmail.com
Wed Jun 10 09:27:16 PDT 2015
From: Marek Olšák <marek.olsak at amd.com>
The problem is it makes Ubuntu Unity dark. It's probably using
OpenGL ES 2.0, chooses an sRGB-capable config and there is no way
to turn off sRGB rendering then.
---
src/glx/dri_common.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/glx/dri_common.c b/src/glx/dri_common.c
index 63c8de3..a5a6c7c 100644
--- a/src/glx/dri_common.c
+++ b/src/glx/dri_common.c
@@ -317,6 +317,15 @@ driConfigEqual(const __DRIcoreExtension *core,
return GL_FALSE;
break;
+ case __DRI_ATTRIB_FRAMEBUFFER_SRGB_CAPABLE:
+ /* Don't expose sRGB-capable configs.
+ * DRI drivers only expose them for EGL_KHR_gl_colorspace,
+ * but historically no drivers have exposed them for GLX.
+ */
+ if (!scalarEqual(config, attrib, 0))
+ return GL_FALSE;
+ break;
+
default:
if (!scalarEqual(config, attrib, value))
return GL_FALSE;
--
2.1.0
More information about the mesa-dev
mailing list