radeonsi: don't enable blending if colormask == 0
authorMarek Olšák <marek.olsak@amd.com>
Fri, 15 Jan 2016 11:59:48 +0000 (12:59 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Fri, 22 Jan 2016 14:02:40 +0000 (15:02 +0100)
most likely useless, but doesn't hurt

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeonsi/si_state.c

index 2a6d2c6ff36bc54eab18eb21cd586ab99074828c..ea441acb1b0a3fdf895050124bcd9d24fd092d2c 100644 (file)
@@ -433,6 +433,9 @@ static void *si_create_blend_state_mode(struct pipe_context *ctx,
 
                unsigned blend_cntl = 0;
 
+               if (!state->rt[j].colormask)
+                       continue;
+
                /* we pretend 8 buffer are used, CB_SHADER_MASK will disable unused one */
                blend->cb_target_mask |= state->rt[j].colormask << (4 * i);