Mesa (master): gallivm/nir: align store_var param order with load_var

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Feb 28 08:53:32 UTC 2020


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

Author: Dave Airlie <airlied at redhat.com>
Date:   Mon Feb 17 16:42:25 2020 +1000

gallivm/nir: align store_var param order with load_var

This was ugly so align load/store to have mostly the same
parameter ordering

Reviewed-by: Roland Scheidegger <sroland at vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3841>

---

 src/gallium/auxiliary/gallivm/lp_bld_nir.c     | 2 +-
 src/gallium/auxiliary/gallivm/lp_bld_nir.h     | 5 +++--
 src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c | 5 +++--
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/gallium/auxiliary/gallivm/lp_bld_nir.c b/src/gallium/auxiliary/gallivm/lp_bld_nir.c
index b8d804e827f..0e8f2df2cf3 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_nir.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_nir.c
@@ -977,7 +977,7 @@ visit_store_var(struct lp_build_nir_context *bld_base,
    if (var)
       get_deref_offset(bld_base, deref, false, NULL, NULL,
                        &const_index, &indir_index);
-   bld_base->store_var(bld_base, mode, bit_size, instr->num_components, writemask, const_index, var, src);
+   bld_base->store_var(bld_base, mode, instr->num_components, bit_size, var, writemask, const_index, src);
 }
 
 static void visit_load_ubo(struct lp_build_nir_context *bld_base,
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_nir.h b/src/gallium/auxiliary/gallivm/lp_bld_nir.h
index f3987fd10b7..8778f6e5179 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_nir.h
+++ b/src/gallium/auxiliary/gallivm/lp_bld_nir.h
@@ -124,11 +124,12 @@ struct lp_build_nir_context
                     LLVMValueRef result[NIR_MAX_VEC_COMPONENTS]);
    void (*store_var)(struct lp_build_nir_context *bld_base,
                      nir_variable_mode deref_mode,
-                     unsigned bit_size,
                      unsigned num_components,
+                     unsigned bit_size,
+                     nir_variable *var,
                      unsigned writemask,
                      unsigned const_index,
-                     nir_variable *var, LLVMValueRef dst);
+                     LLVMValueRef dst);
 
    LLVMValueRef (*load_reg)(struct lp_build_nir_context *bld_base,
                             struct lp_build_context *reg_bld,
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c
index 637ec36ba50..bd812039665 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c
@@ -394,11 +394,12 @@ static void emit_store_chan(struct lp_build_nir_context *bld_base,
 
 static void emit_store_var(struct lp_build_nir_context *bld_base,
                            nir_variable_mode deref_mode,
-                           unsigned bit_size,
                            unsigned num_components,
+                           unsigned bit_size,
+                           nir_variable *var,
                            unsigned writemask,
                            unsigned const_index,
-                           nir_variable *var, LLVMValueRef dst)
+                           LLVMValueRef dst)
 {
    struct lp_build_nir_soa_context *bld = (struct lp_build_nir_soa_context *)bld_base;
    LLVMBuilderRef builder = bld->bld_base.base.gallivm->builder;



More information about the mesa-commit mailing list