summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2016-11-26 15:43:39 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2016-12-14 19:03:10 +0000
commitad374fb2a9928ab9794436fb67c71c27edacb1ed (patch)
tree2d253c41c093b104c24588fda0705def9154a928 /src
parente444e1f23584616077d9f27f94ea98e2a813a2c2 (diff)
downloadexternal_mesa3d-ad374fb2a9928ab9794436fb67c71c27edacb1ed.zip
external_mesa3d-ad374fb2a9928ab9794436fb67c71c27edacb1ed.tar.gz
external_mesa3d-ad374fb2a9928ab9794436fb67c71c27edacb1ed.tar.bz2
radeonsi: set CB_BLEND1_CONTROL.ENABLE for dual source blending
copied from Vulkan Cc: 13.0 <mesa-stable@lists.freedesktop.org> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> (cherry picked from commit ff50c44a5fb4411715da828af5b8706c8a456d26)
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/radeonsi/si_state.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index 5caa921..53f860d 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -454,6 +454,10 @@ static void *si_create_blend_state_mode(struct pipe_context *ctx,
/* Only set dual source blending for MRT0 to avoid a hang. */
if (i >= 1 && blend->dual_src_blend) {
+ /* Vulkan does this for dual source blending. */
+ if (i == 1)
+ blend_cntl |= S_028780_ENABLE(1);
+
si_pm4_set_reg(pm4, R_028780_CB_BLEND0_CONTROL + i * 4, blend_cntl);
continue;
}