radv: add a workaround for a VGT hang with prim restart and strips
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 10 Oct 2018 12:04:42 +0000 (14:04 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 11 Oct 2018 08:16:11 +0000 (10:16 +0200)
Otherwise, Yakuza and The Evil Within hang the GPU with DXVK.
This apparently only works on Polaris.

Suggested by Marek.

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_pipeline.c

index 1e7d7dc945ff8e925aa49f5925deb555487de1fb..426b417e172f7f3576ed2020204001b8bc684dbe 100644 (file)
@@ -3411,6 +3411,17 @@ radv_compute_ia_multi_vgt_param_helpers(struct radv_pipeline *pipeline,
                }
        }
 
+       /* Workaround for a VGT hang when strip primitive types are used with
+        * primitive restart.
+        */
+       if (pipeline->graphics.prim_restart_enable &&
+           (prim == V_008958_DI_PT_LINESTRIP ||
+            prim == V_008958_DI_PT_TRISTRIP ||
+            prim == V_008958_DI_PT_LINESTRIP_ADJ ||
+            prim == V_008958_DI_PT_TRISTRIP_ADJ)) {
+               ia_multi_vgt_param.partial_vs_wave = true;
+       }
+
        ia_multi_vgt_param.base =
                S_028AA8_PRIMGROUP_SIZE(ia_multi_vgt_param.primgroup_size - 1) |
                /* The following field was moved to VGT_SHADER_STAGES_EN in GFX9. */