From 8a02ca1b2eb9dc100a5c7a6089e515485e50fecc Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Sat, 16 Oct 2021 17:16:46 +0200 Subject: [PATCH] egl/x11: Allow all RGB visuals to match 32-bit RGBA EGLConfigs Drop the limitation to 24 or 30 bit configs. It was an abritrary compromise to usually give apps what they wanted, but now we are about to get a clean solution for alpha-blending on X11. Based on a patch by Freya Gentz , see https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2376 Signed-off-by: Robert Mader Signed-off-by: David Heidelberg Part-of: --- src/egl/drivers/dri2/platform_x11.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/egl/drivers/dri2/platform_x11.c b/src/egl/drivers/dri2/platform_x11.c index a587eba9a50..afdd86e0e8f 100644 --- a/src/egl/drivers/dri2/platform_x11.c +++ b/src/egl/drivers/dri2/platform_x11.c @@ -843,8 +843,7 @@ dri2_x11_add_configs_for_visuals(struct dri2_egl_display *dri2_dpy, continue; } - /* Allow a 24-bit RGB visual to match a 32-bit RGBA EGLConfig. - * Ditto for 30-bit RGB visuals to match a 32-bit RGBA EGLConfig. + /* Allows RGB visuals to match a 32-bit RGBA EGLConfig. * Otherwise it will only match a 32-bit RGBA visual. On a * composited window manager on X11, this will make all of the * EGLConfigs with destination alpha get blended by the @@ -852,9 +851,6 @@ dri2_x11_add_configs_for_visuals(struct dri2_egl_display *dri2_dpy, * wants... especially on drivers that only have 32-bit RGBA * EGLConfigs! */ if (sizes[3] != 0) { - if (d.data->depth != 24 && d.data->depth != 30) - continue; - unsigned int rgba_mask = ~(visuals[i].red_mask | visuals[i].green_mask | visuals[i].blue_mask);