radv: round up max_lds_per_simd / lds_per_wave

If each SIMD has to get an different number of waves, report the maximum.

One example of a situation is when a single-wave workgroup uses more than
max_lds_per_simd. This change causes radv_get_max_waves() to report a
single wave per SIMD instead of none.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8761>
This commit is contained in:
Rhys Perry 2021-01-28 13:31:33 +00:00
parent 267d7074d9
commit 6a770cae4b

View file

@ -1602,7 +1602,7 @@ radv_get_max_waves(struct radv_device *device,
unsigned max_lds_per_simd = info->lds_size_per_workgroup / simd_per_workgroup;
if (lds_per_wave)
max_simd_waves = MIN2(max_simd_waves, max_lds_per_simd / lds_per_wave);
max_simd_waves = MIN2(max_simd_waves, DIV_ROUND_UP(max_lds_per_simd, lds_per_wave));
return chip_class >= GFX10 ? max_simd_waves * (wave_size / 32) : max_simd_waves;
}