In order to make ARB_shader_image_load_store, we have to share
the CB space with RATs, so we should only steal the dual src
space if we have dual src enabled.
Signed-off-by: Dave Airlie <airlied@redhat.com>
radeon_emit(cs, reloc);
}
/* set CB_COLOR1_INFO for possible dual-src blending */
- if (i == 1 && state->cbufs[0]) {
+ if (rctx->framebuffer.dual_src_blend && i == 1 && state->cbufs[0]) {
radeon_set_context_reg(cs, R_028C70_CB_COLOR0_INFO + 1 * 0x3C,
cb->cb_color_info | tex->cb_color_info);
i++;
bool export_16bpc;
bool cb0_is_integer;
bool is_msaa_resolve;
+ bool dual_src_blend;
};
struct r600_sample_mask {
radeon_emit(cs, cb[i] ? cb[i]->cb_color_info : 0);
}
/* set CB_COLOR1_INFO for possible dual-src blending */
- if (i == 1 && cb[0]) {
+ if (rctx->framebuffer.dual_src_blend && i == 1 && cb[0]) {
radeon_emit(cs, cb[0]->cb_color_info);
i++;
}
if (update_cb) {
r600_mark_atom_dirty(rctx, &rctx->cb_misc_state.atom);
}
+ if (rctx->framebuffer.dual_src_blend != blend->dual_src_blend) {
+ rctx->framebuffer.dual_src_blend = blend->dual_src_blend;
+ r600_mark_atom_dirty(rctx, &rctx->framebuffer.atom);
+ }
}
static void r600_bind_blend_state(struct pipe_context *ctx, void *state)