[Mesa-stable] [Mesa-dev] [PATCH] radeon: fix ColorMask

Marek Olšák maraeo at gmail.com
Mon Sep 10 20:57:55 UTC 2018


Pushed, thanks!

Marek

On Fri, Sep 7, 2018 at 8:16 PM, Christopher Egert <cme3000 at gmail.com> wrote:
> Since commit af3685d14936844f79e6f372b4b258e29375f21b various OpenGL applications regressed
> on the classic mesa radeon driver.
>
> Signed-off-by: Christopher Egert <cme3000 at gmail.com>
> CC: <mesa-stable at lists.freedesktop.org>
> ---
>  src/mesa/drivers/dri/r200/r200_state.c     | 8 ++++----
>  src/mesa/drivers/dri/radeon/radeon_state.c | 8 ++++----
>  2 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/r200/r200_state.c b/src/mesa/drivers/dri/r200/r200_state.c
> index d53225d63a..b4cff8c259 100644
> --- a/src/mesa/drivers/dri/r200/r200_state.c
> +++ b/src/mesa/drivers/dri/r200/r200_state.c
> @@ -688,10 +688,10 @@ static void r200ColorMask( struct gl_context *ctx,
>     if (!rrb)
>       return;
>     mask = radeonPackColor( rrb->cpp,
> -                          GET_COLORMASK_BIT(ctx->Color.ColorMask, 0, 0),
> -                          GET_COLORMASK_BIT(ctx->Color.ColorMask, 0, 1),
> -                          GET_COLORMASK_BIT(ctx->Color.ColorMask, 0, 2),
> -                          GET_COLORMASK_BIT(ctx->Color.ColorMask, 0, 3) );
> +                          GET_COLORMASK_BIT(ctx->Color.ColorMask, 0, 0)*0xFF,
> +                          GET_COLORMASK_BIT(ctx->Color.ColorMask, 0, 1)*0xFF,
> +                          GET_COLORMASK_BIT(ctx->Color.ColorMask, 0, 2)*0xFF,
> +                          GET_COLORMASK_BIT(ctx->Color.ColorMask, 0, 3)*0xFF );
>
>
>     if (!(r && g && b && a))
> diff --git a/src/mesa/drivers/dri/radeon/radeon_state.c b/src/mesa/drivers/dri/radeon/radeon_state.c
> index 8b72c98a3b..410a78fc08 100644
> --- a/src/mesa/drivers/dri/radeon/radeon_state.c
> +++ b/src/mesa/drivers/dri/radeon/radeon_state.c
> @@ -503,10 +503,10 @@ static void radeonColorMask( struct gl_context *ctx,
>       return;
>
>     mask = radeonPackColor( rrb->cpp,
> -                          GET_COLORMASK_BIT(ctx->Color.ColorMask, 0, 0),
> -                          GET_COLORMASK_BIT(ctx->Color.ColorMask, 0, 1),
> -                          GET_COLORMASK_BIT(ctx->Color.ColorMask, 0, 2),
> -                          GET_COLORMASK_BIT(ctx->Color.ColorMask, 0, 3) );
> +                          GET_COLORMASK_BIT(ctx->Color.ColorMask, 0, 0)*0xFF,
> +                          GET_COLORMASK_BIT(ctx->Color.ColorMask, 0, 1)*0xFF,
> +                          GET_COLORMASK_BIT(ctx->Color.ColorMask, 0, 2)*0xFF,
> +                          GET_COLORMASK_BIT(ctx->Color.ColorMask, 0, 3)*0xFF );
>
>     if ( rmesa->hw.msk.cmd[MSK_RB3D_PLANEMASK] != mask ) {
>        RADEON_STATECHANGE( rmesa, msk );
> --
> 2.19.0.rc2
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-stable mailing list