summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers/dri2
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2015-11-29 16:48:51 +0000
committerEmil Velikov <[email protected]>2016-01-22 11:55:54 +0000
commit54702c2fa1a146f45a1f8c35abe2b529e24b2acf (patch)
tree075f7e32351b3880377577dcd28be561479f6c54 /src/egl/drivers/dri2
parentf29a772a7e0ae5113822bcf14eb3bc87477c5fb1 (diff)
egl/dri2: expose srgb configs when KHR_gl_colorspace is available
Otherwise the user has no way of using it, and we'll try to access the linear one. v2: - Bail out when KHR_gl_colorspace is missing and srgb is set (Marek) Cc: Chih-Wei Huang <[email protected]> Cc: "11.0 11.1" <[email protected]> Fixes: c2c2e9ab604(egl: implement EGL_KHR_gl_colorspace (v2)) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91596 Signed-off-by: Emil Velikov <[email protected]> Tested-by: Mauro Rossi <[email protected]>
Diffstat (limited to 'src/egl/drivers/dri2')
-rw-r--r--src/egl/drivers/dri2/egl_dri2.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index d34b16119e2..8f50f0ce573 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -235,6 +235,8 @@ dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id,
case __DRI_ATTRIB_FRAMEBUFFER_SRGB_CAPABLE:
srgb = value != 0;
+ if (!disp->Extensions.KHR_gl_colorspace && srgb)
+ return NULL;
break;
default: