summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers/dri2/egl_dri2.c
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2013-09-14 23:13:22 -0700
committerKristian Høgsberg <[email protected]>2013-10-15 22:07:52 -0700
commit44e584a73af0ef78321d06a92f372d920b6ee8b7 (patch)
tree1e7ae4d2e68273a6f1ecbd539e8aac513e330891 /src/egl/drivers/dri2/egl_dri2.c
parente3d0a0eac7a742de9ef427b86d2ca0051a957bf7 (diff)
egl_dri2: Remove depth argument from dri2_add_config()
All callers now use the more correct rgba mask mechanism for filtering out mathcing DRI configs. Even if depth and buffer size match, the color component layout can be different, or in case or ARGB8888 and ARGB2101010 the color components can even be different sizes. Since anything that the depth check would reject is also rejected by the rgba mask comparison, the depth parameter is redundant and not specific enough. We should probably have removed it when the rgba masks argument was introduced, but better late than never. Signed-off-by: Kristian Høgsberg <[email protected]>
Diffstat (limited to 'src/egl/drivers/dri2/egl_dri2.c')
-rw-r--r--src/egl/drivers/dri2/egl_dri2.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index 1089616946d..b29eb1c1cbf 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -116,7 +116,7 @@ dri2_match_config(const _EGLConfig *conf, const _EGLConfig *criteria)
struct dri2_egl_config *
dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id,
- int depth, EGLint surface_type, const EGLint *attr_list,
+ EGLint surface_type, const EGLint *attr_list,
const unsigned int *rgba_masks)
{
struct dri2_egl_config *conf;
@@ -200,16 +200,6 @@ 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]);
- /* Allow a 24-bit RGB visual 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!
- */
- if (depth > 0 && depth != base.BufferSize
- && !(depth == 24 && base.BufferSize == 32))
- return NULL;
-
if (rgba_masks && memcmp(rgba_masks, dri_masks, sizeof(dri_masks)))
return NULL;