Mesa (master): radv: fix max_waves estimation on GFX10.3

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jan 20 17:00:53 UTC 2021


Module: Mesa
Branch: master
Commit: 12ea0143de66971c8dc62864621f1100e551bb2e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=12ea0143de66971c8dc62864621f1100e551bb2e

Author: Rhys Perry <pendingchaos02 at gmail.com>
Date:   Tue Jan 19 10:59:47 2021 +0000

radv: fix max_waves estimation on GFX10.3

Signed-off-by: Rhys Perry <pendingchaos02 at gmail.com>
Reviewed-by: Daniel Schürmann <daniel at schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8523>

---

 src/amd/vulkan/radv_shader.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c
index e25ac04c29e..3ce283d19f0 100644
--- a/src/amd/vulkan/radv_shader.c
+++ b/src/amd/vulkan/radv_shader.c
@@ -1578,6 +1578,8 @@ radv_get_max_waves(struct radv_device *device,
 
 	if (conf->num_vgprs) {
 		unsigned vgprs = align(conf->num_vgprs, wave_size == 32 ? 8 : 4);
+		if (chip_class >= GFX10_3)
+		   vgprs = align(vgprs, wave_size == 32 ? 16 : 8);
 		max_simd_waves =
 			MIN2(max_simd_waves,
 			     device->physical_device->rad_info.num_physical_wave64_vgprs_per_simd / vgprs);



More information about the mesa-commit mailing list