summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_state.c
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2016-08-09 12:43:13 +0200
committerMarek Olšák <marek.olsak@amd.com>2016-08-10 15:43:36 +0200
commit947e0614d091c260651e4f3d6209bd6bcc2cfa0d (patch)
tree7b119e1e05fa7fd6b0e75ff11d8f03ebf517d212 /src/gallium/drivers/radeonsi/si_state.c
parent88c2fc6b2deca6ff54f37a100f6f0a0382f8049e (diff)
downloadexternal_mesa3d-947e0614d091c260651e4f3d6209bd6bcc2cfa0d.zip
external_mesa3d-947e0614d091c260651e4f3d6209bd6bcc2cfa0d.tar.gz
external_mesa3d-947e0614d091c260651e4f3d6209bd6bcc2cfa0d.tar.bz2
radeonsi: only set dual source blending for MRT0
This is the proper fix for Overlord and Witcher 2 hangs. The hang condition is that 1 app must write to MRT0 and MRT1 from a pixel shader while MRT1 is disabled in CB_TARGET_MASK (does this generate unflushable pixel quads? I don't know), and another app (e.g. Glamor) must enable dual source blending in both MRT0 and MRT1. The hw gets confused, which leads to corruption and hangs. Cc: 12.0 11.2 <mesa-stable@lists.freedesktop.org> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_state.c')
-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 47fc7a0..f5b2330 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -460,6 +460,10 @@ static void *si_create_blend_state_mode(struct pipe_context *ctx,
S_028760_COLOR_COMB_FCN(V_028760_OPT_COMB_BLEND_DISABLED) |
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)
continue;