ac/gpu_info: use max_good_cu_per_sa for computation of max_scratch_waves

every CU should be able to use scratch

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482>
This commit is contained in:
Marek Olšák 2025-02-20 11:55:45 -05:00 committed by Marge Bot
parent 66130a51d3
commit 96722aeda3

View file

@ -1591,7 +1591,7 @@ bool ac_query_gpu_info(int fd, void *dev_p, struct radeon_info *info,
* We can decrease the number to make it fit into the infinity cache.
*/
const unsigned max_waves_per_tg = 32; /* 1024 threads in Wave32 */
info->max_scratch_waves = MAX2(32 * info->min_good_cu_per_sa * info->max_sa_per_se * info->num_se,
info->max_scratch_waves = MAX2(32 * info->max_good_cu_per_sa * info->max_sa_per_se * info->num_se,
max_waves_per_tg);
info->has_scratch_base_registers = info->gfx_level >= GFX11 ||
(!info->has_graphics && info->family >= CHIP_GFX940);