summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_atom_blend.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-12-29 16:17:14 -0700
committerBrian Paul <brianp@vmware.com>2009-12-29 16:17:14 -0700
commitfd5511d27fc44096117c47ab503fb5b47f993061 (patch)
treece5b1a3152d1c7ec495403f43e222c421b6e99d0 /src/mesa/state_tracker/st_atom_blend.c
parent126b35bd3acbf486471879531cd2e6f446b14497 (diff)
mesa: implement per-buffer color masking
This is part of the GL_EXT_draw_buffers2 extension and part of GL 3.0. The ctx->Color.ColorMask field is now a 2-D array. Until drivers are modified to support per-buffer color masking, they can just look at the 0th color mask. The new _mesa_ColorMaskIndexed() function will be called by glColorMaskIndexedEXT() or glColorMaski().
Diffstat (limited to 'src/mesa/state_tracker/st_atom_blend.c')
-rw-r--r--src/mesa/state_tracker/st_atom_blend.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/state_tracker/st_atom_blend.c b/src/mesa/state_tracker/st_atom_blend.c
index 35c09c3e08..43e62c29f3 100644
--- a/src/mesa/state_tracker/st_atom_blend.c
+++ b/src/mesa/state_tracker/st_atom_blend.c
@@ -200,13 +200,13 @@ update_blend( struct st_context *st )
}
/* Colormask - maybe reverse these bits? */
- if (st->ctx->Color.ColorMask[0])
+ if (st->ctx->Color.ColorMask[0][0])
blend->colormask |= PIPE_MASK_R;
- if (st->ctx->Color.ColorMask[1])
+ if (st->ctx->Color.ColorMask[0][1])
blend->colormask |= PIPE_MASK_G;
- if (st->ctx->Color.ColorMask[2])
+ if (st->ctx->Color.ColorMask[0][2])
blend->colormask |= PIPE_MASK_B;
- if (st->ctx->Color.ColorMask[3])
+ if (st->ctx->Color.ColorMask[0][3])
blend->colormask |= PIPE_MASK_A;
if (st->ctx->Color.DitherFlag)