Mesa (12.0): radeonsi: always set all blend registers
Emil Velikov
evelikov at kemper.freedesktop.org
Mon Dec 5 15:33:49 UTC 2016
Module: Mesa
Branch: 12.0
Commit: a9e5a98c192db487cbad0b44f7c570e315529cb2
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a9e5a98c192db487cbad0b44f7c570e315529cb2
Author: Marek Olšák <marek.olsak at amd.com>
Date: Sat Nov 26 15:39:06 2016 +0100
radeonsi: always set all blend registers
better safe than sorry
Cc: 13.0 <mesa-stable at lists.freedesktop.org>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
(cherry picked from commit 87b208a54e67b6b01845efa2ec20a96963399920)
Conflicts:
src/gallium/drivers/radeonsi/si_state.c
---
src/gallium/drivers/radeonsi/si_state.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index f221296..eb84d61 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -461,16 +461,15 @@ static void *si_create_blend_state_mode(struct pipe_context *ctx,
S_028760_ALPHA_COMB_FCN(V_028760_OPT_COMB_BLEND_DISABLED);
/* Only set dual source blending for MRT0 to avoid a hang. */
- if (i >= 1 && blend->dual_src_blend)
- continue;
-
- if (!state->rt[j].colormask)
+ if (i >= 1 && blend->dual_src_blend) {
+ si_pm4_set_reg(pm4, R_028780_CB_BLEND0_CONTROL + i * 4, blend_cntl);
continue;
+ }
/* cb_render_state will disable unused ones */
blend->cb_target_mask |= (unsigned)state->rt[j].colormask << (4 * i);
- if (!state->rt[j].blend_enable) {
+ if (!state->rt[j].colormask || !state->rt[j].blend_enable) {
si_pm4_set_reg(pm4, R_028780_CB_BLEND0_CONTROL + i * 4, blend_cntl);
continue;
}
More information about the mesa-commit
mailing list