summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2016-11-26 15:52:05 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2016-12-14 19:03:10 +0000
commit9275ed559534862685f8fff2e82da628edfa871c (patch)
treebdddb8ad0a35ffc64958ac0df58ec29bde7895de
parentad374fb2a9928ab9794436fb67c71c27edacb1ed (diff)
downloadexternal_mesa3d-9275ed559534862685f8fff2e82da628edfa871c.zip
external_mesa3d-9275ed559534862685f8fff2e82da628edfa871c.tar.gz
external_mesa3d-9275ed559534862685f8fff2e82da628edfa871c.tar.bz2
radeonsi: disable RB+ blend optimizations for dual source blending
This fixes dual source blending on Stoney. The fix was copied from Vulkan. The problem was discovered during internal testing. Cc: 13.0 <mesa-stable@lists.freedesktop.org> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> (cherry picked from commit 5e5573b1bf8565f38e9b770b5357d069e80ff00d)
-rw-r--r--src/gallium/drivers/radeonsi/si_state.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index 53f860d..9e6e3d2 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -557,6 +557,17 @@ static void *si_create_blend_state_mode(struct pipe_context *ctx,
}
if (sctx->b.family == CHIP_STONEY) {
+ /* Disable RB+ blend optimizations for dual source blending.
+ * Vulkan does this.
+ */
+ if (blend->dual_src_blend) {
+ for (int i = 0; i < 8; i++) {
+ sx_mrt_blend_opt[i] =
+ S_028760_COLOR_COMB_FCN(V_028760_OPT_COMB_NONE) |
+ S_028760_ALPHA_COMB_FCN(V_028760_OPT_COMB_NONE);
+ }
+ }
+
for (int i = 0; i < 8; i++)
si_pm4_set_reg(pm4, R_028760_SX_MRT0_BLEND_OPT + i * 4,
sx_mrt_blend_opt[i]);