struct gen6_blend_state_key {
GLboolean color_blend, alpha_enabled;
GLboolean dither;
+ GLboolean color_mask[4];
GLenum logic_op;
memset(key, 0, sizeof(*key));
+ /* _NEW_COLOR */
+ memcpy(key->color_mask, ctx->Color.ColorMask[0], sizeof(key->color_mask));
+
/* _NEW_COLOR */
if (ctx->Color._LogicOpEnabled)
key->logic_op = ctx->Color.LogicOp;
blend.blend1.x_dither_offset = 0;
}
+ blend.blend1.write_disable_r = !key->color_mask[0];
+ blend.blend1.write_disable_g = !key->color_mask[1];
+ blend.blend1.write_disable_b = !key->color_mask[2];
+ blend.blend1.write_disable_a = !key->color_mask[3];
+
bo = brw_upload_cache(&brw->cache, BRW_BLEND_STATE,
key, sizeof(*key),
NULL, 0,