num_draw_buffers(num_draw_buffers),
num_layers(num_layers)
{
+ color_write_disable[0] = false;
+ color_write_disable[1] = false;
+ color_write_disable[2] = false;
+ color_write_disable[3] = false;
}
extern "C" {
brw_blorp_surface_info dst;
enum gen6_hiz_op hiz_op;
unsigned fast_clear_op;
+ bool color_write_disable[4];
bool use_wm_prog;
brw_blorp_wm_push_constants wm_push_consts;
const unsigned num_varyings;
blend[i].blend1.pre_blend_clamp_enable = 1;
blend[i].blend1.post_blend_clamp_enable = 1;
blend[i].blend1.clamp_range = BRW_RENDERTARGET_CLAMPRANGE_FORMAT;
+
+ blend[i].blend1.write_disable_r = params->color_write_disable[0];
+ blend[i].blend1.write_disable_g = params->color_write_disable[1];
+ blend[i].blend1.write_disable_b = params->color_write_disable[2];
+ blend[i].blend1.write_disable_a = params->color_write_disable[3];
}
return cc_blend_state_offset;
memset(blend, 0, size);
for (unsigned i = 0; i < params->num_draw_buffers; ++i) {
+ if (params->color_write_disable[0])
+ blend[1 + 2 * i] |= GEN8_BLEND_WRITE_DISABLE_RED;
+ if (params->color_write_disable[1])
+ blend[1 + 2 * i] |= GEN8_BLEND_WRITE_DISABLE_GREEN;
+ if (params->color_write_disable[2])
+ blend[1 + 2 * i] |= GEN8_BLEND_WRITE_DISABLE_BLUE;
+ if (params->color_write_disable[3])
+ blend[1 + 2 * i] |= GEN8_BLEND_WRITE_DISABLE_ALPHA;
+
blend[1 + 2 * i + 1] = GEN8_BLEND_PRE_BLEND_COLOR_CLAMP_ENABLE |
GEN8_BLEND_POST_BLEND_COLOR_CLAMP_ENABLE |
GEN8_BLEND_COLOR_CLAMP_RANGE_RTFORMAT;