summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_state.c
diff options
context:
space:
mode:
authorCorbin Simpson <[email protected]>2010-01-30 12:33:44 -0800
committerCorbin Simpson <[email protected]>2010-01-30 12:33:44 -0800
commitb6ac2403aca240c72c8622ddbc3a4e123d5aa37f (patch)
treef9567ee9850338bef3fab52d87f28e31736ffc19 /src/gallium/drivers/r300/r300_state.c
parent627a45848faf9e6d19d386b9eb30d36bf18d0998 (diff)
r300g: Independent blend enables only work on r500.
Diffstat (limited to 'src/gallium/drivers/r300/r300_state.c')
-rw-r--r--src/gallium/drivers/r300/r300_state.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c
index 82957995530..a5c0869066c 100644
--- a/src/gallium/drivers/r300/r300_state.c
+++ b/src/gallium/drivers/r300/r300_state.c
@@ -161,6 +161,7 @@ static boolean blend_discard_if_src_alpha_color_1(unsigned srcRGB, unsigned srcA
static void* r300_create_blend_state(struct pipe_context* pipe,
const struct pipe_blend_state* state)
{
+ struct r300_screen* r300screen = r300_screen(pipe->screen);
struct r300_blend_state* blend = CALLOC_STRUCT(r300_blend_state);
if (state->rt[0].blend_enable)
@@ -290,10 +291,16 @@ static void* r300_create_blend_state(struct pipe_context* pipe,
/* 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 (r300screen->caps->is_r500 && state->independent_blend_enable) {
+ if (state->rt[1].blend_enable) {
+ blend->color_channel_mask |= (state->rt[1].colormask << 4);
+ }
+ if (state->rt[2].blend_enable) {
+ blend->color_channel_mask |= (state->rt[2].colormask << 8);
+ }
+ if (state->rt[3].blend_enable) {
+ blend->color_channel_mask |= (state->rt[3].colormask << 12);
+ }
}
if (state->dither) {