summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r300/r300_state.c
diff options
context:
space:
mode:
authorCorbin Simpson <MostAwesomeDude@gmail.com>2010-01-28 13:39:13 -0800
committerCorbin Simpson <MostAwesomeDude@gmail.com>2010-01-28 13:39:47 -0800
commit00873227292df458b28249d7c3736d633e619dab (patch)
treefcd854660b4564918123c8a610d33d7a45b00722 /src/gallium/drivers/r300/r300_state.c
parent2e481e9fad946ffb0e3121a2e9d3531e131da0ec (diff)
r300g: Clean up blend masks, change caps.
progs/tests/drawbuffers should work, except I can't test it. GG new shader parser. GG.
Diffstat (limited to 'src/gallium/drivers/r300/r300_state.c')
-rw-r--r--src/gallium/drivers/r300/r300_state.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c
index 3cdcf94274..8295799553 100644
--- a/src/gallium/drivers/r300/r300_state.c
+++ b/src/gallium/drivers/r300/r300_state.c
@@ -288,18 +288,12 @@ static void* r300_create_blend_state(struct pipe_context* pipe,
(state->logicop_func) << R300_RB3D_ROPCNTL_ROP_SHIFT;
}
- /* Color Channel Mask */
- if (state->rt[0].colormask & PIPE_MASK_R) {
- blend->color_channel_mask |= RB3D_COLOR_CHANNEL_MASK_RED_MASK0;
- }
- if (state->rt[0].colormask & PIPE_MASK_G) {
- blend->color_channel_mask |= RB3D_COLOR_CHANNEL_MASK_GREEN_MASK0;
- }
- if (state->rt[0].colormask & PIPE_MASK_B) {
- blend->color_channel_mask |= RB3D_COLOR_CHANNEL_MASK_BLUE_MASK0;
- }
- if (state->rt[0].colormask & PIPE_MASK_A) {
- blend->color_channel_mask |= RB3D_COLOR_CHANNEL_MASK_ALPHA_MASK0;
+ /* Color channel masks for all MRTs. */
+ blend->color_channel_mask = state->rt[0].colormask;
+ if (state->independent_blend_enable) {
+ blend->color_channel_mask |= (state->rt[1].colormask << 4);
+ blend->color_channel_mask |= (state->rt[2].colormask << 8);
+ blend->color_channel_mask |= (state->rt[3].colormask << 12);
}
if (state->dither) {