diff options
Diffstat (limited to 'src/egl/drivers/dri2')
-rw-r--r-- | src/egl/drivers/dri2/egl_dri2.c | 4 | ||||
-rw-r--r-- | src/egl/drivers/dri2/platform_x11.c | 29 |
2 files changed, 16 insertions, 17 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index 63864346594..23d0e469427 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -187,7 +187,6 @@ static const EGLint dri2_to_egl_attribute_map[__DRI_ATTRIB_MAX] = { [__DRI_ATTRIB_MAX_SWAP_INTERVAL] = EGL_MAX_SWAP_INTERVAL, [__DRI_ATTRIB_MIN_SWAP_INTERVAL] = EGL_MIN_SWAP_INTERVAL, [__DRI_ATTRIB_YINVERTED] = EGL_Y_INVERTED_NOK, - [__DRI_ATTRIB_CONFIG_SELECT_GROUP] = EGL_CONFIG_SELECT_GROUP_MESA, }; const __DRIconfig * @@ -203,9 +202,6 @@ dri2_get_dri_config(struct dri2_egl_config *conf, EGLint surface_type, static EGLBoolean dri2_match_config(const _EGLConfig *conf, const _EGLConfig *criteria) { - if (conf->NativeVisualID != criteria->NativeVisualID) - return EGL_FALSE; - if (_eglCompareConfigs(conf, criteria, NULL, EGL_FALSE) != 0) return EGL_FALSE; diff --git a/src/egl/drivers/dri2/platform_x11.c b/src/egl/drivers/dri2/platform_x11.c index 414d5f74c5d..5a1e2f31890 100644 --- a/src/egl/drivers/dri2/platform_x11.c +++ b/src/egl/drivers/dri2/platform_x11.c @@ -816,25 +816,28 @@ dri2_x11_add_configs_for_visuals(struct dri2_egl_display *dri2_dpy, if (dri2_conf->base.ConfigID == config_count + 1) config_count++; - /* Allows RGB visuals to match a 32-bit RGBA EGLConfig. + /* 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. * 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 * compositor. This is probably not what the application * wants... especially on drivers that only have 32-bit RGBA * EGLConfigs! */ - unsigned int rgba_mask = ~(visuals[i].red_mask | - visuals[i].green_mask | - visuals[i].blue_mask); - rgba_shifts[3] = ffs(rgba_mask) - 1; - rgba_sizes[3] = util_bitcount(rgba_mask); - dri2_conf = dri2_add_config(disp, config, config_count + 1, - surface_type, config_attrs, - rgba_shifts, rgba_sizes); - if (dri2_conf) - if (dri2_conf->base.ConfigID == config_count + 1) - config_count++; - } + if (d.data->depth == 24 || d.data->depth == 30) { + unsigned int rgba_mask = ~(visuals[i].red_mask | + visuals[i].green_mask | + visuals[i].blue_mask); + rgba_shifts[3] = ffs(rgba_mask) - 1; + rgba_sizes[3] = util_bitcount(rgba_mask); + dri2_conf = dri2_add_config(disp, config, config_count + 1, + surface_type, config_attrs, + rgba_shifts, rgba_sizes); + if (dri2_conf) + if (dri2_conf->base.ConfigID == config_count + 1) + config_count++; + } + } } xcb_depth_next(&d); |