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 db8f670970fd4d853e4c8e44066dd5d499fa32ac..0f851dd1ed4f7ca5a99492c36873ef2250452b23 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);