gallivm: clean-up in lp_bld_nir.h
authorBrian Paul <brianp@vmware.com>
Thu, 19 May 2022 02:59:14 +0000 (20:59 -0600)
committerMarge Bot <emma+marge@anholt.net>
Wed, 15 Jun 2022 12:30:04 +0000 (12:30 +0000)
Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16937>

src/gallium/auxiliary/gallivm/lp_bld_nir.h

index 1ca26ca..6c40d98 100644 (file)
@@ -309,11 +309,14 @@ struct lp_build_nir_aos_context
    const struct lp_build_sampler_aos *sampler;
 };
 
+
 bool
 lp_build_nir_llvm(struct lp_build_nir_context *bld_base,
                   struct nir_shader *nir);
 
-void lp_build_opt_nir(struct nir_shader *nir);
+void
+lp_build_opt_nir(struct nir_shader *nir);
+
 
 static inline LLVMValueRef
 lp_nir_array_build_gather_values(LLVMBuilderRef builder,
@@ -322,16 +325,17 @@ lp_nir_array_build_gather_values(LLVMBuilderRef builder,
 {
    LLVMTypeRef arr_type = LLVMArrayType(LLVMTypeOf(values[0]), value_count);
    LLVMValueRef arr = LLVMGetUndef(arr_type);
-   unsigned i;
 
-   for (i = 0; i < value_count; i++) {
+   for (unsigned i = 0; i < value_count; i++) {
       arr = LLVMBuildInsertValue(builder, arr, values[i], i, "");
    }
    return arr;
 }
 
-static inline struct lp_build_context *get_flt_bld(struct lp_build_nir_context *bld_base,
-                                                   unsigned op_bit_size)
+
+static inline struct lp_build_context *
+get_flt_bld(struct lp_build_nir_context *bld_base,
+            unsigned op_bit_size)
 {
    switch (op_bit_size) {
    case 64:
@@ -344,9 +348,11 @@ static inline struct lp_build_context *get_flt_bld(struct lp_build_nir_context *
    }
 }
 
-static inline struct lp_build_context *get_int_bld(struct lp_build_nir_context *bld_base,
-                                                   bool is_unsigned,
-                                                   unsigned op_bit_size)
+
+static inline struct lp_build_context *
+get_int_bld(struct lp_build_nir_context *bld_base,
+            bool is_unsigned,
+            unsigned op_bit_size)
 {
    if (is_unsigned) {
       switch (op_bit_size) {
@@ -375,11 +381,16 @@ static inline struct lp_build_context *get_int_bld(struct lp_build_nir_context *
    }
 }
 
+
 static inline struct lp_build_nir_aos_context *
 lp_nir_aos_context(struct lp_build_nir_context *bld_base)
 {
-   return (struct lp_build_nir_aos_context *)bld_base;
+   return (struct lp_build_nir_aos_context *) bld_base;
 }
 
-LLVMValueRef lp_nir_aos_conv_const(struct gallivm_state *gallivm, LLVMValueRef constval, int nc);
+
+LLVMValueRef
+lp_nir_aos_conv_const(struct gallivm_state *gallivm,
+                      LLVMValueRef constval, int nc);
+
 #endif