r600g: change programming of CB_SHADER_MASK on r600-r700
authorMarek Olšák <maraeo@gmail.com>
Tue, 21 Aug 2012 18:26:20 +0000 (20:26 +0200)
committerMarek Olšák <maraeo@gmail.com>
Thu, 30 Aug 2012 17:43:55 +0000 (19:43 +0200)
This one actually makes more sense and gives the expected value
for MSAA resolve.

Reviewed-by: Jerome Glisse <jglisse@redhat.com>
src/gallium/drivers/r600/r600_state.c

index 8f6b0cd988b099466a60af10d5834d1f87d77617..cf7fa01ffdfb0520221d18e27863a58fd78e0412 100644 (file)
@@ -1510,7 +1510,8 @@ static void r600_emit_cb_misc_state(struct r600_context *rctx, struct r600_atom
 
        r600_write_context_reg_seq(cs, R_028238_CB_TARGET_MASK, 2);
        r600_write_value(cs, a->blend_colormask & fb_colormask); /* R_028238_CB_TARGET_MASK */
-       r600_write_value(cs, (a->dual_src_blend ? ps_colormask : 0) | fb_colormask); /* R_02823C_CB_SHADER_MASK */
+       /* Always enable the first color output to make sure alpha-test works even without one. */
+       r600_write_value(cs, 0xf | (multiwrite ? fb_colormask : ps_colormask)); /* R_02823C_CB_SHADER_MASK */
        r600_write_context_reg(cs, R_028808_CB_COLOR_CONTROL,
                               a->cb_color_control |
                               S_028808_MULTIWRITE_ENABLE(multiwrite));