Module: Mesa
Branch: main
Commit: dd7b6898e6a61dc3e746ca3b4fa4c308a2f4cfa5
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=dd7b6898e6a61dc3e746ca3b4fa4c308a2f4cfa5

Author: Daniel Schürmann <[email protected]>
Date:   Wed Dec  6 10:38:25 2023 +0100

radv: fix number of physical SGPRs on GFX10+

This change has no effect.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26521>

---

 src/amd/compiler/aco_ir.cpp                   | 2 +-
 src/amd/vulkan/winsys/null/radv_null_winsys.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/amd/compiler/aco_ir.cpp b/src/amd/compiler/aco_ir.cpp
index 46ccc5201b5..cd8d1efee80 100644
--- a/src/amd/compiler/aco_ir.cpp
+++ b/src/amd/compiler/aco_ir.cpp
@@ -114,7 +114,7 @@ init_program(Program* program, Stage stage, const struct 
aco_shader_info* info,
    program->dev.vgpr_alloc_granule = 4;
 
    if (gfx_level >= GFX10) {
-      program->dev.physical_sgprs = 5120; /* doesn't matter as long as it's at 
least 128 * 40 */
+      program->dev.physical_sgprs = 128 * 20; /* enough for max waves */
       program->dev.sgpr_alloc_granule = 128;
       program->dev.sgpr_limit =
          108; /* includes VCC, which can be treated as s[106-107] on GFX10+ */
diff --git a/src/amd/vulkan/winsys/null/radv_null_winsys.c 
b/src/amd/vulkan/winsys/null/radv_null_winsys.c
index 6912d1b6c8f..399ac1731e7 100644
--- a/src/amd/vulkan/winsys/null/radv_null_winsys.c
+++ b/src/amd/vulkan/winsys/null/radv_null_winsys.c
@@ -123,7 +123,7 @@ radv_null_winsys_query_info(struct radeon_winsys *rws, 
struct radeon_info *info)
       info->max_waves_per_simd = 10;
 
    if (info->gfx_level >= GFX10)
-      info->num_physical_sgprs_per_simd = 128 * info->max_waves_per_simd * 2;
+      info->num_physical_sgprs_per_simd = 128 * info->max_waves_per_simd;
    else if (info->gfx_level >= GFX8)
       info->num_physical_sgprs_per_simd = 800;
    else

Reply via email to