iris: write DISABLES are not write ENABLES...whoops
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 31 Jan 2018 01:40:44 +0000 (17:40 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:05 +0000 (10:26 -0800)
src/gallium/drivers/iris/iris_state.c

index 68607bf11f8fdefd32a6f39120bb65c3feb64fc7..ae07c3a05189ae8c2e07c9ae1688b559f1541ef9 100644 (file)
@@ -443,10 +443,10 @@ iris_create_blend_state(struct pipe_context *ctx,
          be.DestinationBlendFactor      = state->rt[i].rgb_dst_factor;
          be.DestinationAlphaBlendFactor = state->rt[i].alpha_dst_factor;
 
-         be.WriteDisableRed   = state->rt[i].colormask & PIPE_MASK_R;
-         be.WriteDisableGreen = state->rt[i].colormask & PIPE_MASK_G;
-         be.WriteDisableBlue  = state->rt[i].colormask & PIPE_MASK_B;
-         be.WriteDisableAlpha = state->rt[i].colormask & PIPE_MASK_A;
+         be.WriteDisableRed   = !(state->rt[i].colormask & PIPE_MASK_R);
+         be.WriteDisableGreen = !(state->rt[i].colormask & PIPE_MASK_G);
+         be.WriteDisableBlue  = !(state->rt[i].colormask & PIPE_MASK_B);
+         be.WriteDisableAlpha = !(state->rt[i].colormask & PIPE_MASK_A);
       }
       blend_state += GENX(BLEND_STATE_ENTRY_length);
    }