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

Author: Rhys Perry <pendingchao...@gmail.com>
Date:   Thu Jan  4 15:56:26 2024 +0000

radv: remove radv_shader_info's cs.subgroup_size

This is the same as wave_size.

Signed-off-by: Rhys Perry <pendingchao...@gmail.com>
Reviewed-by: Daniel Schürmann <dan...@schuermann.dev>
Reviewed-by: Samuel Pitoiset <samuel.pitoi...@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26894>

---

 src/amd/vulkan/radv_shader.h      |  2 --
 src/amd/vulkan/radv_shader_info.c | 10 +++++-----
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/src/amd/vulkan/radv_shader.h b/src/amd/vulkan/radv_shader.h
index b209092a260..345526b1513 100644
--- a/src/amd/vulkan/radv_shader.h
+++ b/src/amd/vulkan/radv_shader.h
@@ -461,8 +461,6 @@ struct radv_shader_info {
       bool uses_local_invocation_idx;
       unsigned block_size[3];
 
-      uint8_t subgroup_size;
-
       bool is_rt_shader;
       bool uses_ray_launch_size;
       bool uses_dynamic_rt_callable_stack;
diff --git a/src/amd/vulkan/radv_shader_info.c 
b/src/amd/vulkan/radv_shader_info.c
index 4270beab009..04decebfca4 100644
--- a/src/amd/vulkan/radv_shader_info.c
+++ b/src/amd/vulkan/radv_shader_info.c
@@ -347,7 +347,7 @@ radv_get_wave_size(struct radv_device *device, 
gl_shader_stage stage, const stru
    if (stage == MESA_SHADER_GEOMETRY && !info->is_ngg)
       return 64;
    else if (stage == MESA_SHADER_COMPUTE || stage == MESA_SHADER_TASK)
-      return info->cs.subgroup_size;
+      return info->wave_size;
    else if (stage == MESA_SHADER_FRAGMENT)
       return device->physical_device->ps_wave_size;
    else if (gl_shader_stage_is_rt(stage))
@@ -937,14 +937,14 @@ gather_shader_info_cs(struct radv_device *device, const 
nir_shader *nir, const s
    const unsigned required_subgroup_size = 
pipeline_key->stage_info[nir->info.stage].subgroup_required_size * 32;
 
    if (required_subgroup_size) {
-      info->cs.subgroup_size = required_subgroup_size;
+      info->wave_size = required_subgroup_size;
    } else if (require_full_subgroups) {
-      info->cs.subgroup_size = RADV_SUBGROUP_SIZE;
+      info->wave_size = RADV_SUBGROUP_SIZE;
    } else if (device->physical_device->rad_info.gfx_level >= GFX10 && 
local_size <= 32) {
       /* Use wave32 for small workgroups. */
-      info->cs.subgroup_size = 32;
+      info->wave_size = 32;
    } else {
-      info->cs.subgroup_size = default_wave_size;
+      info->wave_size = default_wave_size;
    }
 
    if (device->physical_device->rad_info.has_cs_regalloc_hang_bug) {

Reply via email to