blend_bypass = 1;
}
- alphatest_bypass = ntype == V_028C70_NUMBER_UINT || ntype == V_028C70_NUMBER_SINT;
- if (rctx->alphatest_state.bypass != alphatest_bypass) {
- rctx->alphatest_state.bypass = alphatest_bypass;
- r600_atom_dirty(rctx, &rctx->alphatest_state.atom);
+ /* Alpha-test is done on the first colorbuffer only. */
+ if (cb == 0) {
+ alphatest_bypass = ntype == V_028C70_NUMBER_UINT || ntype == V_028C70_NUMBER_SINT;
+ if (rctx->alphatest_state.bypass != alphatest_bypass) {
+ rctx->alphatest_state.bypass = alphatest_bypass;
+ r600_atom_dirty(rctx, &rctx->alphatest_state.atom);
+ }
}
color_info |= S_028C70_FORMAT(format) |
rctx->export_16bpc = false;
}
+ /* Alpha-test is done on the first colorbuffer only. */
+ if (cb == 0 && rctx->alphatest_state.cb0_export_16bpc != rctx->export_16bpc) {
+ rctx->alphatest_state.cb0_export_16bpc = rctx->export_16bpc;
+ r600_atom_dirty(rctx, &rctx->alphatest_state.atom);
+ }
+
/* for possible dual-src MRT */
if (cb == 0 && rctx->framebuffer.nr_cbufs == 1 && !rtex->is_rat) {
r600_pipe_state_add_reg_bo(rstate,
rctx->cb_misc_state.nr_cbufs = state->nr_cbufs;
r600_atom_dirty(rctx, &rctx->cb_misc_state.atom);
}
- if (rctx->alphatest_state.export_16bpc != rctx->export_16bpc) {
- rctx->alphatest_state.export_16bpc = rctx->export_16bpc;
- r600_atom_dirty(rctx, &rctx->alphatest_state.atom);
- }
}
static void evergreen_emit_cb_misc_state(struct r600_context *rctx, struct r600_atom *atom)
unsigned sx_alpha_test_control; /* this comes from dsa state */
unsigned sx_alpha_ref; /* this comes from dsa state */
bool bypass;
- bool export_16bpc; /* from set_framebuffer_state */
+ bool cb0_export_16bpc; /* from set_framebuffer_state */
};
enum r600_pipe_state_id {
blend_bypass = 1;
}
- alphatest_bypass = ntype == V_0280A0_NUMBER_UINT || ntype == V_0280A0_NUMBER_SINT;
- if (rctx->alphatest_state.bypass != alphatest_bypass) {
- rctx->alphatest_state.bypass = alphatest_bypass;
- r600_atom_dirty(rctx, &rctx->alphatest_state.atom);
+ /* Alpha-test is done on the first colorbuffer only. */
+ if (cb == 0) {
+ alphatest_bypass = ntype == V_0280A0_NUMBER_UINT || ntype == V_0280A0_NUMBER_SINT;
+ if (rctx->alphatest_state.bypass != alphatest_bypass) {
+ rctx->alphatest_state.bypass = alphatest_bypass;
+ r600_atom_dirty(rctx, &rctx->alphatest_state.atom);
+ }
}
color_info |= S_0280A0_FORMAT(format) |