r600: use CB_TARGET_MASK instead of CB_SHADER_MASK for setting color mask
authorAndre Maasikas <amaasikas@gmail.com>
Mon, 28 Sep 2009 08:23:49 +0000 (11:23 +0300)
committerDave Airlie <airlied@linux.ie>
Tue, 29 Sep 2009 09:24:35 +0000 (19:24 +1000)
makes blend functions work better

Signed-off-by: Dave Airlie <airlied@linux.ie>
src/mesa/drivers/dri/r600/r700_state.c

index 3ad6d74f536f54532776382d6d9770718d13d70a..7e8b48f91ebe0e5409cc552b8513a8919af045d3 100644 (file)
@@ -771,9 +771,9 @@ static void r700ColorMask(GLcontext * ctx,
                             (b ? 4 : 0) |
                             (a ? 8 : 0));
 
-       if (mask != r700->CB_SHADER_MASK.u32All) {
+       if (mask != r700->CB_TARGET_MASK.u32All) {
                R600_STATECHANGE(context, cb);
-               SETfield(r700->CB_SHADER_MASK.u32All, mask, OUTPUT0_ENABLE_shift, OUTPUT0_ENABLE_mask);
+               SETfield(r700->CB_TARGET_MASK.u32All, mask, TARGET0_ENABLE_shift, TARGET0_ENABLE_mask);
        }
 }
 
@@ -1780,7 +1780,7 @@ void r700InitState(GLcontext * ctx) //-------------------
     r700->CB_CLRCMP_MSK.u32All = 0xFFFFFFFF;
 
     /* screen/window/view */
-    SETfield(r700->CB_TARGET_MASK.u32All, 0xF, (4 * id), TARGET0_ENABLE_mask);
+    SETfield(r700->CB_SHADER_MASK.u32All, 0xF, (4 * id), OUTPUT0_ENABLE_mask);
 
     context->radeon.hw.all_dirty = GL_TRUE;