965: fix colormask state
authorKeith Whitwell <keith@tungstengraphics.com>
Wed, 19 Dec 2007 10:49:16 +0000 (10:49 +0000)
committerKeith Whitwell <keith@tungstengraphics.com>
Wed, 19 Dec 2007 11:10:35 +0000 (11:10 +0000)
src/mesa/pipe/i965simple/brw_wm_surface_state.c

index db8f670..0f851dd 100644 (file)
@@ -221,10 +221,10 @@ static void upload_wm_surfaces(struct brw_context *brw )
                              brw->attribs.Blend->blend_enable);
 
 
-      surf.ss0.writedisable_red =   !brw->attribs.BlendColor.color[0];
-      surf.ss0.writedisable_green = !brw->attribs.BlendColor.color[1];
-      surf.ss0.writedisable_blue =  !brw->attribs.BlendColor.color[2];
-      surf.ss0.writedisable_alpha = !brw->attribs.BlendColor.color[3];
+      surf.ss0.writedisable_red =   !(brw->attribs.Blend->colormask & PIPE_MASK_R);
+      surf.ss0.writedisable_green = !(brw->attribs.Blend->colormask & PIPE_MASK_G);
+      surf.ss0.writedisable_blue =  !(brw->attribs.Blend->colormask & PIPE_MASK_B);
+      surf.ss0.writedisable_alpha = !(brw->attribs.Blend->colormask & PIPE_MASK_A);