From 86352ff70d8c9a31fe0ebb4d02ce4bb4644fe54a Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 12 Jul 2007 12:20:14 -0600 Subject: Added colormask, dither, multisample state. Implement colormasking stage. --- src/mesa/state_tracker/st_atom_blend.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/mesa/state_tracker/st_atom_blend.c') diff --git a/src/mesa/state_tracker/st_atom_blend.c b/src/mesa/state_tracker/st_atom_blend.c index 3e5410cfab..256f13471a 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 */ -- cgit v1.2.3