1 From c2954b16c8730c7ed8441fd8dba25900f3aed265 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Tapani=20P=C3=A4lli?= <tapani.palli@intel.com>
3 Date: Tue, 28 Nov 2017 09:23:29 +0200
4 Subject: [PATCH] glx: do not pick sRGB config for 32-bit RGBA visual
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
9 This fixes blending issues seen with kwin and gnome-shell when
10 32bit visual has sRGB capability set.
12 Reviewed-by: Adam Jackson <ajax@redhat.com>
13 Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
14 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103699
15 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103646
16 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103655
18 glx/glxscreens.c | 5 +++++
19 1 file changed, 5 insertions(+)
21 diff --git a/glx/glxscreens.c b/glx/glxscreens.c
22 index 73444152a..596d972e0 100644
23 --- a/glx/glxscreens.c
24 +++ b/glx/glxscreens.c
25 @@ -271,6 +271,11 @@ pickFBConfig(__GLXscreen * pGlxScreen, VisualPtr visual)
26 /* If it's the 32-bit RGBA visual, demand a 32-bit fbconfig. */
27 if (visual->nplanes == 32 && config->rgbBits != 32)
29 + /* If it's the 32-bit RGBA visual, do not pick sRGB capable config.
30 + * This can cause issues with compositors that are not sRGB aware.
32 + if (visual->nplanes == 32 && config->sRGBCapable == GL_TRUE)
34 /* Can't use the same FBconfig for multiple X visuals. I think. */
35 if (config->visualID != 0)