From 96722aeda3b80d70695d52193d72511f91d75a49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Thu, 20 Feb 2025 11:55:45 -0500 Subject: [PATCH] ac/gpu_info: use max_good_cu_per_sa for computation of max_scratch_waves MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit every CU should be able to use scratch Reviewed-by: Timur Kristóf Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/amd/common/ac_gpu_info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/common/ac_gpu_info.c b/src/amd/common/ac_gpu_info.c index 045c8e2953b..fdd12d2cad8 100644 --- a/src/amd/common/ac_gpu_info.c +++ b/src/amd/common/ac_gpu_info.c @@ -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);