Cc: 13.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
* specific value is taken from the proprietary driver.
*/
*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);
+ }
+
sctx->last_num_patches = *num_patches;
output_patch0_offset = input_patch_size * *num_patches;