From 2e043c9bcf0182bb631a9ed0c4562775106cd1db Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Tue, 6 Feb 2018 09:45:01 +0000 Subject: [PATCH] egl/wayland: Fix ARGB/XRGB transposition in config map When 0b2b7191214eb moved from an if tree to a struct to map between wl_drm formats and EGLConfigs, it transposed the mapping between XRGB and ARGB. Luckily, everyone exposes both formats, so this is harmless. Signed-off-by: Daniel Stone Fixes: 0b2b7191214eb ("egl/wayland: introduce dri2_wl_add_configs_for_visuals() helper") Reviewed-by: Emil Velikov Reviewed-by: Eric Engestrom Tested-by: Ilia Mirkin (cherry picked from commit 4fbd2d50b1c06a3c10f3a254e933646345123751) [Juan A. Suarez: resolve trivial conflicts] Signed-off-by: Juan A. Suarez Romero Conflicts: src/egl/drivers/dri2/platform_wayland.c --- src/egl/drivers/dri2/platform_wayland.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c index b844df368ff..d8d28523086 100644 --- a/src/egl/drivers/dri2/platform_wayland.c +++ b/src/egl/drivers/dri2/platform_wayland.c @@ -1227,8 +1227,8 @@ dri2_wl_add_configs_for_visuals(_EGLDriver *drv, _EGLDisplay *disp) int has_format; unsigned int rgba_masks[4]; } visuals[] = { - { "XRGB8888", HAS_XRGB8888, { 0xff0000, 0xff00, 0x00ff, 0xff000000 } }, - { "ARGB8888", HAS_ARGB8888, { 0xff0000, 0xff00, 0x00ff, 0 } }, + { "XRGB8888", HAS_XRGB8888, { 0xff0000, 0xff00, 0x00ff, 0 } }, + { "ARGB8888", HAS_ARGB8888, { 0xff0000, 0xff00, 0x00ff, 0xff000000 } }, { "RGB565", HAS_RGB565, { 0x00f800, 0x07e0, 0x001f, 0 } }, }; unsigned int format_count[ARRAY_SIZE(visuals)] = { 0 };