Mesa (master): radv/gfx10: adjust the LDS size used to compute waves
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Feb 26 08:20:16 UTC 2020
Module: Mesa
Branch: master
Commit: 568f1504098f6204bcc842d66be0126764cb7d13
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=568f1504098f6204bcc842d66be0126764cb7d13
Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date: Thu Feb 20 08:50:29 2020 +0100
radv/gfx10: adjust the LDS size used to compute waves
It's 128KB per CU in WGP.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3899>
---
src/amd/vulkan/radv_shader.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c
index cad95f830aa..1220b4ae8b7 100644
--- a/src/amd/vulkan/radv_shader.c
+++ b/src/amd/vulkan/radv_shader.c
@@ -1336,11 +1336,9 @@ radv_get_max_waves(struct radv_device *device,
RADV_NUM_PHYSICAL_VGPRS / vgprs);
}
- /* LDS is 64KB per CU (4 SIMDs), divided into 16KB blocks per SIMD
- * that PS can use.
- */
+ unsigned max_lds_per_simd = device->physical_device->rad_info.lds_size_per_cu / device->physical_device->rad_info.num_simd_per_compute_unit;
if (lds_per_wave)
- max_simd_waves = MIN2(max_simd_waves, 16384 / lds_per_wave);
+ max_simd_waves = MIN2(max_simd_waves, max_lds_per_simd / lds_per_wave);
return max_simd_waves;
}
More information about the mesa-commit
mailing list