From af3685d14936844f79e6f372b4b258e29375f21b Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Wed, 31 Jan 2018 03:03:25 +0100 Subject: 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 --- src/mesa/swrast/s_triangle.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/mesa/swrast/s_triangle.c') diff --git a/src/mesa/swrast/s_triangle.c b/src/mesa/swrast/s_triangle.c index a4113e5582b..c84cfec93d3 100644 --- a/src/mesa/swrast/s_triangle.c +++ b/src/mesa/swrast/s_triangle.c @@ -1027,10 +1027,10 @@ _swrast_choose_triangle( struct gl_context *ctx ) !_mesa_stencil_is_enabled(ctx) && depthRb && depthRb->Format == MESA_FORMAT_Z_UNORM16) { - if (ctx->Color.ColorMask[0][0] == 0 && - ctx->Color.ColorMask[0][1] == 0 && - ctx->Color.ColorMask[0][2] == 0 && - ctx->Color.ColorMask[0][3] == 0) { + if (GET_COLORMASK_BIT(ctx->Color.ColorMask, 0, 0) == 0 && + GET_COLORMASK_BIT(ctx->Color.ColorMask, 0, 1) == 0 && + GET_COLORMASK_BIT(ctx->Color.ColorMask, 0, 2) == 0 && + GET_COLORMASK_BIT(ctx->Color.ColorMask, 0, 3) == 0) { USE(occlusion_zless_16_triangle); return; } -- cgit v1.2.3