summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_atom_blend.c
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-07-12 12:20:14 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-07-12 12:20:14 -0600
commit86352ff70d8c9a31fe0ebb4d02ce4bb4644fe54a (patch)
tree2dcf373eacfec2e125771e3a5b51116969fefe46 /src/mesa/state_tracker/st_atom_blend.c
parentbd5533bb7c90d8da06f6a1c38bdc84bb607c5b85 (diff)
downloadexternal_mesa3d-86352ff70d8c9a31fe0ebb4d02ce4bb4644fe54a.zip
external_mesa3d-86352ff70d8c9a31fe0ebb4d02ce4bb4644fe54a.tar.gz
external_mesa3d-86352ff70d8c9a31fe0ebb4d02ce4bb4644fe54a.tar.bz2
Added colormask, dither, multisample state. Implement colormasking stage.
Diffstat (limited to 'src/mesa/state_tracker/st_atom_blend.c')
-rw-r--r--src/mesa/state_tracker/st_atom_blend.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_atom_blend.c b/src/mesa/state_tracker/st_atom_blend.c
index 3e5410c..256f134 100644
--- a/src/mesa/state_tracker/st_atom_blend.c
+++ b/src/mesa/state_tracker/st_atom_blend.c
@@ -196,6 +196,19 @@ update_blend( struct st_context *st )
/* no blending / logicop */
}
+ /* Colormask - maybe reverse these bits? */
+ if (st->ctx->Color.ColorMask[0])
+ blend.colormask |= PIPE_MASK_R;
+ if (st->ctx->Color.ColorMask[1])
+ blend.colormask |= PIPE_MASK_G;
+ if (st->ctx->Color.ColorMask[2])
+ blend.colormask |= PIPE_MASK_B;
+ if (st->ctx->Color.ColorMask[3])
+ blend.colormask |= PIPE_MASK_A;
+
+ if (st->ctx->Color.DitherFlag)
+ blend.dither = 1;
+
if (memcmp(&blend, &st->state.blend, sizeof(blend)) != 0) {
/* state has changed */
st->state.blend = blend; /* struct copy */