diff options
author | Marek Olšák <[email protected]> | 2018-01-31 03:03:25 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2018-02-04 01:50:10 +0100 |
commit | af3685d14936844f79e6f372b4b258e29375f21b (patch) | |
tree | 84c3ab4b661bceaf4364be3e7c9501cb6b50537e /src/mesa/swrast/s_context.c | |
parent | 83e60ce927142752c57163fcb8b30eca2370d014 (diff) |
mesa: change ctx->Color.ColorMask into a 32-bit bitmask
4 bits per draw buffer, 8 draw buffers in total --> 32 bits.
This is easier to work with.
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/swrast/s_context.c')
-rw-r--r-- | src/mesa/swrast/s_context.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c index 9f3d21f91d1..f7f08b19dd9 100644 --- a/src/mesa/swrast/s_context.c +++ b/src/mesa/swrast/s_context.c @@ -65,10 +65,7 @@ _swrast_update_rasterflags( struct gl_context *ctx ) if (ctx->Scissor.EnableFlags) rasterMask |= CLIP_BIT; if (_mesa_stencil_is_enabled(ctx)) rasterMask |= STENCIL_BIT; for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) { - if (!ctx->Color.ColorMask[i][0] || - !ctx->Color.ColorMask[i][1] || - !ctx->Color.ColorMask[i][2] || - !ctx->Color.ColorMask[i][3]) { + if (GET_COLORMASK(ctx->Color.ColorMask, i) != 0xf) { rasterMask |= MASKING_BIT; break; } @@ -96,10 +93,7 @@ _swrast_update_rasterflags( struct gl_context *ctx ) } for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) { - if (ctx->Color.ColorMask[i][0] + - ctx->Color.ColorMask[i][1] + - ctx->Color.ColorMask[i][2] + - ctx->Color.ColorMask[i][3] == 0) { + if (GET_COLORMASK(ctx->Color.ColorMask, i) == 0) { rasterMask |= MULTI_DRAW_BIT; /* all RGBA channels disabled */ break; } |