[Mesa-dev] [PATCH] st/dri: enable 32-bit RGBX/RGBA formats only on Android

Marek Olšák maraeo at gmail.com
Sat Jul 29 21:51:27 UTC 2017


Hi Tomasz,

This is for 17.2 only. Not master. I have a different fix for master.

Reviewed-by: Marek Olšák <marek.olsak at amd.com>

Marek

On Sat, Jul 29, 2017 at 5:02 PM, Tomasz Figa <tfiga at chromium.org> wrote:

> X/GLX can't handle them. This removes almost 500 GLX visuals that were
> incorrectly exposed.
>
> This replaces the revert originally requested by Marek and has the
> benefit of keeping Android running, while eliminating the risk of
> breaking X/GLX, until we provide a proper solution to deal with these
> formats.
>
> Suggested-by: Marek Olšák <marek.olsak at amd.com>
> Signed-off-by: Tomasz Figa <tfiga at chromium.org>
> CC: <mesa-stable at lists.freedesktop.org>
> Fixes: f33d8af7aa354d "st/dri: add 32-bit RGBX/RGBA formats"
> ---
>  src/gallium/state_trackers/dri/dri_screen.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
>
> diff --git a/src/gallium/state_trackers/dri/dri_screen.c
> b/src/gallium/state_trackers/dri/dri_screen.c
> index 1dd7bd3ec1..d1d7aa4840 100644
> --- a/src/gallium/state_trackers/dri/dri_screen.c
> +++ b/src/gallium/state_trackers/dri/dri_screen.c
> @@ -133,6 +133,11 @@ dri_fill_in_modes(struct dri_screen *screen)
>        MESA_FORMAT_B8G8R8A8_SRGB,
>        MESA_FORMAT_B8G8R8X8_SRGB,
>        MESA_FORMAT_B5G6R5_UNORM,
> +#ifdef ANDROID
> +      /*
> +       * To reduce the risk of breaking non-Android users in stable
> release
> +       * let's keep these for Android alone until this is handled
> properly.
> +       */
>
>        /* The 32-bit RGBA format must not precede the 32-bit BGRA format.
>         * Likewise for RGBX and BGRX.  Otherwise, the GLX client and the
> GLX
> @@ -154,6 +159,7 @@ dri_fill_in_modes(struct dri_screen *screen)
>
>        /* Required by Android, for HAL_PIXEL_FORMAT_RGBX_8888. */
>        MESA_FORMAT_R8G8B8X8_UNORM,
> +#endif
>     };
>     static const enum pipe_format pipe_formats[] = {
>        PIPE_FORMAT_BGRA8888_UNORM,
> @@ -161,8 +167,14 @@ dri_fill_in_modes(struct dri_screen *screen)
>        PIPE_FORMAT_BGRA8888_SRGB,
>        PIPE_FORMAT_BGRX8888_SRGB,
>        PIPE_FORMAT_B5G6R5_UNORM,
> +#ifdef ANDROID
> +      /*
> +       * To reduce the risk of breaking non-Android users in stable
> release
> +       * let's keep these for Android alone until this is handled
> properly.
> +       */
>        PIPE_FORMAT_RGBA8888_UNORM,
>        PIPE_FORMAT_RGBX8888_UNORM,
> +#endif
>     };
>     mesa_format format;
>     __DRIconfig **configs = NULL;
> --
> 2.14.0.rc0.400.g1c36432dff-goog
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170729/3a22ffd6/attachment-0001.html>


More information about the mesa-dev mailing list