summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2016-11-29 20:41:23 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2016-12-14 19:03:11 +0000
commit590366320d3f14ff6b677a5f9449a476715a6172 (patch)
tree4f534917efdea296e1300689a04cb10fafc47f68
parenta30cbf5a70451c1962d85df5651ab5db3d07607d (diff)
downloadexternal_mesa3d-590366320d3f14ff6b677a5f9449a476715a6172.zip
external_mesa3d-590366320d3f14ff6b677a5f9449a476715a6172.tar.gz
external_mesa3d-590366320d3f14ff6b677a5f9449a476715a6172.tar.bz2
radeonsi: apply a tessellation bug workaround for SI
Cc: 13.0 <mesa-stable@lists.freedesktop.org> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> (cherry picked from commit 78c4528ae7709fbe94d917d034cfd60535b5dcf3) [Emil Velikov: resolve trivial conflict] Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Conflicts: src/gallium/drivers/radeonsi/si_state_draw.c
-rw-r--r--src/gallium/drivers/radeonsi/si_state_draw.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c
index 447acc1..592d9b9 100644
--- a/src/gallium/drivers/radeonsi/si_state_draw.c
+++ b/src/gallium/drivers/radeonsi/si_state_draw.c
@@ -154,6 +154,12 @@ static void si_emit_derived_tess_state(struct si_context *sctx,
*/
*num_patches = MIN2(*num_patches, 40);
+ /* SI bug workaround - limit LS-HS threadgroups to only one wave. */
+ if (sctx->b.chip_class == SI) {
+ unsigned one_wave = 64 / MAX2(num_tcs_input_cp, num_tcs_output_cp);
+ *num_patches = MIN2(*num_patches, one_wave);
+ }
+
output_patch0_offset = input_patch_size * *num_patches;
perpatch_output_offset = output_patch0_offset + pervertex_output_patch_size;