From b74bbf960eb4135eac64a9f2824bcb5aa5d68bfa Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Fri, 22 Feb 2013 19:01:40 -0800 Subject: [PATCH] egl: Allow 24-bit visuals for 32-bit RGBA8888 configs Previously only the 32-bit X visual would match the 32-bit RGBA8888 configs. This resulted in every config with alpha getting the "magic" visual whose alpha is used by the compositor. This also resulted in no multisample visuals being advertised. How many ways could we lose? This patch inverts the problem... now you can't get the visual with alpha used by the compositor even if you want it. Signed-off-by: Ian Romanick Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59783 --- src/egl/drivers/dri2/egl_dri2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index ae842d7..083d934 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -195,7 +195,8 @@ dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id, for (i = 0; attr_list[i] != EGL_NONE; i += 2) _eglSetConfigKey(&base, attr_list[i], attr_list[i+1]); - if (depth > 0 && depth != base.BufferSize) + if (depth > 0 && + !(depth == base.BufferSize || (depth == 24 && base.BufferSize == 32))) return NULL; if (rgba_masks && memcmp(rgba_masks, dri_masks, sizeof(dri_masks))) -- 1.7.11.7