From 51995f69204e8a751cb1a3e502e013acf7fff031 Mon Sep 17 00:00:00 2001 From: Christopher Egert Date: Sat, 8 Sep 2018 02:16:48 +0200 Subject: radeon: fix ColorMask MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since commit af3685d14936844f79e6f372b4b258e29375f21b various OpenGL applications regressed on the classic mesa radeon driver. Signed-off-by: Christopher Egert CC: 18.1 18.2 Signed-off-by: Marek Olšák --- 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(-) (limited to 'src/mesa/drivers/dri') diff --git a/src/mesa/drivers/dri/r200/r200_state.c b/src/mesa/drivers/dri/r200/r200_state.c index d53225d63ab..b4cff8c2592 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 8b72c98a3b2..410a78fc084 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 ); -- cgit v1.2.3