summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers/dri2/platform_android.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2013-09-14 23:13:22 -0700
committerKristian Høgsberg <krh@bitplanet.net>2013-10-15 22:07:52 -0700
commit44e584a73af0ef78321d06a92f372d920b6ee8b7 (patch)
tree1e7ae4d2e68273a6f1ecbd539e8aac513e330891 /src/egl/drivers/dri2/platform_android.c
parente3d0a0eac7a742de9ef427b86d2ca0051a957bf7 (diff)
downloadexternal_mesa3d-44e584a73af0ef78321d06a92f372d920b6ee8b7.zip
external_mesa3d-44e584a73af0ef78321d06a92f372d920b6ee8b7.tar.gz
external_mesa3d-44e584a73af0ef78321d06a92f372d920b6ee8b7.tar.bz2
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 <krh@bitplanet.net>
Diffstat (limited to 'src/egl/drivers/dri2/platform_android.c')
-rw-r--r--src/egl/drivers/dri2/platform_android.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/egl/drivers/dri2/platform_android.c b/src/egl/drivers/dri2/platform_android.c
index ff41e83..2c20de7 100644
--- a/src/egl/drivers/dri2/platform_android.c
+++ b/src/egl/drivers/dri2/platform_android.c
@@ -547,14 +547,13 @@ droid_add_configs_for_visuals(_EGLDriver *drv, _EGLDisplay *dpy)
struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
const struct {
int format;
- int size;
unsigned int rgba_masks[4];
} visuals[] = {
- { HAL_PIXEL_FORMAT_RGBA_8888, 32, { 0xff, 0xff00, 0xff0000, 0xff000000 } },
- { HAL_PIXEL_FORMAT_RGBX_8888, 32, { 0xff, 0xff00, 0xff0000, 0x0 } },
- { HAL_PIXEL_FORMAT_RGB_888, 24, { 0xff, 0xff00, 0xff0000, 0x0 } },
- { HAL_PIXEL_FORMAT_RGB_565, 16, { 0xf800, 0x7e0, 0x1f, 0x0 } },
- { HAL_PIXEL_FORMAT_BGRA_8888, 32, { 0xff0000, 0xff00, 0xff, 0xff000000 } },
+ { HAL_PIXEL_FORMAT_RGBA_8888, { 0xff, 0xff00, 0xff0000, 0xff000000 } },
+ { HAL_PIXEL_FORMAT_RGBX_8888, { 0xff, 0xff00, 0xff0000, 0x0 } },
+ { HAL_PIXEL_FORMAT_RGB_888, { 0xff, 0xff00, 0xff0000, 0x0 } },
+ { HAL_PIXEL_FORMAT_RGB_565, { 0xf800, 0x7e0, 0x1f, 0x0 } },
+ { HAL_PIXEL_FORMAT_BGRA_8888, { 0xff0000, 0xff00, 0xff, 0xff000000 } },
{ 0, 0, { 0, 0, 0, 0 } }
};
int count, i, j;
@@ -576,8 +575,7 @@ droid_add_configs_for_visuals(_EGLDriver *drv, _EGLDisplay *dpy)
continue;
dri2_conf = dri2_add_config(dpy, dri2_dpy->driver_configs[j],
- count + 1, visuals[i].size, surface_type, NULL,
- visuals[i].rgba_masks);
+ count + 1, surface_type, NULL, visuals[i].rgba_masks);
if (dri2_conf) {
dri2_conf->base.NativeVisualID = visuals[i].format;
dri2_conf->base.NativeVisualType = visuals[i].format;