[Mesa-dev] [PATCH 01/18] egl/wayland: Fix ARGB/XRGB transposition in config map

Eric Engestrom eric at engestrom.ch
Thu Feb 8 18:40:17 UTC 2018



On February 8, 2018 2:06:23 PM UTC, Daniel Stone <daniels at collabora.com> wrote:
> 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 <daniels at collabora.com>
> Fixes: 0b2b7191214eb ("egl/wayland: introduce
> dri2_wl_add_configs_for_visuals() helper")
> Cc: Emil Velikov <emil.velikov at collabora.com>
> Cc: Eric Engestrom <eric at engestrom.ch>

Reviewed-by: Eric Engestrom <eric at engestrom.ch>

(On my phone and you cc'ed me, but I'll also review the rest of the series tomorrow)

> ---
>  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 24b99075397..6a1e6ecf9af 100644
> --- a/src/egl/drivers/dri2/platform_wayland.c
> +++ b/src/egl/drivers/dri2/platform_wayland.c
> @@ -1271,8 +1271,8 @@ dri2_wl_add_configs_for_visuals(_EGLDriver *drv,
> _EGLDisplay *disp)
>     } visuals[] = {
> { "XRGB2101010", HAS_XRGB2101010, { 0x3ff00000, 0xffc00, 0x3ff, 0 } },
> { "ARGB2101010", HAS_ARGB2101010, { 0x3ff00000, 0xffc00, 0x3ff,
> 0xc0000000 } },
> -      { "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 } },

One note though, the prefixing 0s are very inconsistent in this table, might be worth cleaning that up too?

>     };
>     unsigned int format_count[ARRAY_SIZE(visuals)] = { 0 };


More information about the mesa-dev mailing list