[Mesa-dev] [PATCH] gbm: Fix the alpha masks in the GBM format table.

Ilia Mirkin imirkin at alum.mit.edu
Fri Feb 23 23:00:46 UTC 2018


Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>

On Fri, Feb 23, 2018 at 5:57 PM, Eric Anholt <eric at anholt.net> wrote:
> Once GBM started looking at the values of the alpha masks, ARGB/ABGR
> wouldn't match any more because we had both A and R in the low bits.
>
> Fixes: 2ed344645d65 ("gbm/dri: Add RGBA masks to GBM format table")
> ---
>  src/gbm/backends/dri/gbm_dri.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c
> index 0d088bd62b62..f987c04c1b7d 100644
> --- a/src/gbm/backends/dri/gbm_dri.c
> +++ b/src/gbm/backends/dri/gbm_dri.c
> @@ -562,7 +562,7 @@ static const struct gbm_dri_visual gbm_dri_visuals_table[] = {
>     },
>     {
>       GBM_FORMAT_ARGB8888, __DRI_IMAGE_FORMAT_ARGB8888,
> -     { 0x00ff0000, 0x0000ff00, 0x000000ff, 0x000000ff },
> +     { 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000 },
>     },
>     {
>       GBM_FORMAT_XBGR8888, __DRI_IMAGE_FORMAT_XBGR8888,
> @@ -570,7 +570,7 @@ static const struct gbm_dri_visual gbm_dri_visuals_table[] = {
>     },
>     {
>       GBM_FORMAT_ABGR8888, __DRI_IMAGE_FORMAT_ABGR8888,
> -     { 0x000000ff, 0x0000ff00, 0x00ff0000, 0x000000ff },
> +     { 0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000 },
>     },
>     {
>       GBM_FORMAT_XRGB2101010, __DRI_IMAGE_FORMAT_XRGB2101010,
> --
> 2.16.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list