diff options
author | Samuel Pitoiset <[email protected]> | 2020-02-20 08:48:38 +0100 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-02-26 07:58:47 +0000 |
commit | 974c87e449633e6a9bc761cd83ebf07663f4ed3b (patch) | |
tree | dc6208694a356e4f264cbb76dedc194596ed1c91 /src/gallium/drivers | |
parent | cd6ec2b1abbd96f4456e92613c2232c919bb9023 (diff) |
ac,radeonsi: add ac_gpu_info::lds_size_per_cu
Both RadeonSI and RADV use the WGP mode, so we can assume 128KB on
GFX10.
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3899>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index fa35489ea50..12878cf97b9 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -1063,13 +1063,7 @@ static void si_calculate_max_simd_waves(struct si_shader *shader) max_simd_waves = MIN2(max_simd_waves, max_vgprs / conf->num_vgprs); } - /* LDS is 64KB per CU (4 SIMDs) on GFX6-9, which is 16KB per SIMD (usage above - * 16KB makes some SIMDs unoccupied). - * - * LDS is 128KB in WGP mode and 64KB in CU mode. Assume the WGP mode is used. - */ - unsigned max_lds_size = sscreen->info.chip_class >= GFX10 ? 128*1024 : 64*1024; - unsigned max_lds_per_simd = max_lds_size / 4; + unsigned max_lds_per_simd = sscreen->info.lds_size_per_cu / 4; if (lds_per_wave) max_simd_waves = MIN2(max_simd_waves, max_lds_per_simd / lds_per_wave); |