Mesa (main): radeonsi: rename uses_vmem_* flags

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jan 18 11:42:28 UTC 2022


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

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Wed Jan 12 22:45:53 2022 -0500

radeonsi: rename uses_vmem_* flags

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14528>

---

 src/gallium/drivers/radeonsi/si_shader.h          |  4 ++--
 src/gallium/drivers/radeonsi/si_shader_info.c     | 14 +++++++-------
 src/gallium/drivers/radeonsi/si_state_shaders.cpp |  8 ++++----
 3 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_shader.h b/src/gallium/drivers/radeonsi/si_shader.h
index b08f59e44d6..ba5a8ce1cc6 100644
--- a/src/gallium/drivers/radeonsi/si_shader.h
+++ b/src/gallium/drivers/radeonsi/si_shader.h
@@ -413,8 +413,8 @@ struct si_shader_info {
    bool uses_indirect_descriptor;
    bool has_divergent_loop;
 
-   bool uses_vmem_return_type_sampler_or_bvh;
-   bool uses_vmem_return_type_other; /* all other VMEM loads and atomics with return */
+   bool uses_vmem_sampler_or_bvh;
+   bool uses_vmem_load_other; /* all other VMEM loads and atomics with return */
 
    /** Whether all codepaths write tess factors in all invocations. */
    bool tessfactors_are_def_in_all_invocs;
diff --git a/src/gallium/drivers/radeonsi/si_shader_info.c b/src/gallium/drivers/radeonsi/si_shader_info.c
index fa9fc57711b..6099d13e13d 100644
--- a/src/gallium/drivers/radeonsi/si_shader_info.c
+++ b/src/gallium/drivers/radeonsi/si_shader_info.c
@@ -384,10 +384,10 @@ static void scan_instruction(const struct nir_shader *nir, struct si_shader_info
       case nir_texop_txd:
       case nir_texop_lod:
       case nir_texop_tg4:
-         info->uses_vmem_return_type_sampler_or_bvh = true;
+         info->uses_vmem_sampler_or_bvh = true;
          break;
       default:
-         info->uses_vmem_return_type_other = true;
+         info->uses_vmem_load_other = true;
          break;
       }
 
@@ -414,16 +414,16 @@ static void scan_instruction(const struct nir_shader *nir, struct si_shader_info
          switch (intr->intrinsic) {
          case nir_intrinsic_load_ubo:
             if (!nir_src_is_const(intr->src[1]))
-               info->uses_vmem_return_type_other = true;
+               info->uses_vmem_load_other = true;
             break;
          case nir_intrinsic_load_constant:
-            info->uses_vmem_return_type_other = true;
+            info->uses_vmem_load_other = true;
             break;
 
          case nir_intrinsic_load_barycentric_at_sample: /* This loads sample positions. */
          case nir_intrinsic_load_tess_level_outer: /* TES input read from memory */
          case nir_intrinsic_load_tess_level_inner: /* TES input read from memory */
-            info->uses_vmem_return_type_other = true;
+            info->uses_vmem_load_other = true;
             break;
 
          case nir_intrinsic_load_input:
@@ -431,7 +431,7 @@ static void scan_instruction(const struct nir_shader *nir, struct si_shader_info
          case nir_intrinsic_load_per_vertex_input:
             if (nir->info.stage == MESA_SHADER_VERTEX ||
                 nir->info.stage == MESA_SHADER_TESS_EVAL)
-               info->uses_vmem_return_type_other = true;
+               info->uses_vmem_load_other = true;
             break;
 
          default:
@@ -442,7 +442,7 @@ static void scan_instruction(const struct nir_shader *nir, struct si_shader_info
                  intr->intrinsic == nir_intrinsic_load_global ||
                  intr->intrinsic == nir_intrinsic_store_global) ||
                 strstr(intr_name, "scratch"))
-               info->uses_vmem_return_type_other = true;
+               info->uses_vmem_load_other = true;
             break;
          }
       }
diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.cpp b/src/gallium/drivers/radeonsi/si_state_shaders.cpp
index 8bd813c1ee3..d45b0c766be 100644
--- a/src/gallium/drivers/radeonsi/si_state_shaders.cpp
+++ b/src/gallium/drivers/radeonsi/si_state_shaders.cpp
@@ -509,8 +509,8 @@ bool si_shader_mem_ordered(struct si_shader *shader)
    const struct si_shader_info *prev_info =
       shader->previous_stage_sel ? &shader->previous_stage_sel->info : NULL;
 
-   bool sampler_or_bvh = info->uses_vmem_return_type_sampler_or_bvh;
-   bool other = info->uses_vmem_return_type_other ||
+   bool sampler_or_bvh = info->uses_vmem_sampler_or_bvh;
+   bool other = info->uses_vmem_load_other ||
                 info->uses_indirect_descriptor ||
                 shader->config.scratch_bytes_per_wave ||
                 (info->stage == MESA_SHADER_FRAGMENT &&
@@ -518,8 +518,8 @@ bool si_shader_mem_ordered(struct si_shader *shader)
                   shader->key.ps.part.prolog.poly_stipple));
 
    if (prev_info) {
-      sampler_or_bvh |= prev_info->uses_vmem_return_type_sampler_or_bvh;
-      other |= prev_info->uses_vmem_return_type_other ||
+      sampler_or_bvh |= prev_info->uses_vmem_sampler_or_bvh;
+      other |= prev_info->uses_vmem_load_other ||
                prev_info->uses_indirect_descriptor;
    }
 



More information about the mesa-commit mailing list