diff options
Diffstat (limited to 'src/mesa/main/accum.c')
-rw-r--r-- | src/mesa/main/accum.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mesa/main/accum.c b/src/mesa/main/accum.c index 2b15b6ee0d3..5fbee8fbdbd 100644 --- a/src/mesa/main/accum.c +++ b/src/mesa/main/accum.c @@ -298,10 +298,10 @@ accum_return(struct gl_context *ctx, GLfloat value, /* Loop over destination buffers */ for (buffer = 0; buffer < fb->_NumColorDrawBuffers; buffer++) { struct gl_renderbuffer *colorRb = fb->_ColorDrawBuffers[buffer]; - const GLboolean masking = (!ctx->Color.ColorMask[buffer][RCOMP] || - !ctx->Color.ColorMask[buffer][GCOMP] || - !ctx->Color.ColorMask[buffer][BCOMP] || - !ctx->Color.ColorMask[buffer][ACOMP]); + const GLboolean masking = (!GET_COLORMASK_BIT(ctx->Color.ColorMask, buffer, 0) || + !GET_COLORMASK_BIT(ctx->Color.ColorMask, buffer, 1) || + !GET_COLORMASK_BIT(ctx->Color.ColorMask, buffer, 2) || + !GET_COLORMASK_BIT(ctx->Color.ColorMask, buffer, 3)); GLbitfield mappingFlags = GL_MAP_WRITE_BIT; if (masking) @@ -340,19 +340,19 @@ accum_return(struct gl_context *ctx, GLfloat value, _mesa_unpack_rgba_row(colorRb->Format, width, colorMap, dest); /* use the dest colors where mask[channel] = 0 */ - if (ctx->Color.ColorMask[buffer][RCOMP] == 0) { + if (!GET_COLORMASK_BIT(ctx->Color.ColorMask, buffer, 0)) { for (i = 0; i < width; i++) rgba[i][RCOMP] = dest[i][RCOMP]; } - if (ctx->Color.ColorMask[buffer][GCOMP] == 0) { + if (!GET_COLORMASK_BIT(ctx->Color.ColorMask, buffer, 1)) { for (i = 0; i < width; i++) rgba[i][GCOMP] = dest[i][GCOMP]; } - if (ctx->Color.ColorMask[buffer][BCOMP] == 0) { + if (!GET_COLORMASK_BIT(ctx->Color.ColorMask, buffer, 2)) { for (i = 0; i < width; i++) rgba[i][BCOMP] = dest[i][BCOMP]; } - if (ctx->Color.ColorMask[buffer][ACOMP] == 0) { + if (!GET_COLORMASK_BIT(ctx->Color.ColorMask, buffer, 3)) { for (i = 0; i < width; i++) rgba[i][ACOMP] = dest[i][ACOMP]; } |