gallivm/nir: align store_var param order with load_var
authorDave Airlie <airlied@redhat.com>
Mon, 17 Feb 2020 06:42:25 +0000 (16:42 +1000)
committerDave Airlie <airlied@redhat.com>
Fri, 28 Feb 2020 08:33:34 +0000 (18:33 +1000)
This was ugly so align load/store to have mostly the same
parameter ordering

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

src/gallium/auxiliary/gallivm/lp_bld_nir.c
src/gallium/auxiliary/gallivm/lp_bld_nir.h
src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c

index b8d804e827fe9fc5fb814c42c400ed81bfd99fd4..0e8f2df2cf3d79da64aa8f02d45557f3e81820e7 100644 (file)
@@ -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,
index f3987fd10b73e420c98969a0006cc46eef7e705f..8778f6e5179fc05d27ddf706ecfaefae2871f1fb 100644 (file)
@@ -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,
index 637ec36ba50b2912d94304fc5591e127a447c89c..bd8120396655c4ad8ef5ae5c1130c69956a7f53a 100644 (file)
@@ -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;