gallivm: fix whitespace in get_deref_offset
authorDave Airlie <airlied@redhat.com>
Wed, 17 May 2023 01:26:53 +0000 (11:26 +1000)
committerMarge Bot <emma+marge@anholt.net>
Tue, 23 May 2023 14:39:33 +0000 (14:39 +0000)
Reviewed-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23065>

src/gallium/auxiliary/gallivm/lp_bld_nir.c

index 34130b9..24e7f4e 100644 (file)
@@ -1338,16 +1338,16 @@ get_deref_offset(struct lp_build_nir_context *bld_base, nir_deref_instr *instr,
       } else if (path.path[idx_lvl]->deref_type == nir_deref_type_array) {
          unsigned size = glsl_count_attribute_slots(path.path[idx_lvl]->type, vs_in);
          if (nir_src_is_const(path.path[idx_lvl]->arr.index)) {
-           const_offset += nir_src_comp_as_int(path.path[idx_lvl]->arr.index, 0) * size;
+            const_offset += nir_src_comp_as_int(path.path[idx_lvl]->arr.index, 0) * size;
          } else {
-           LLVMValueRef idx_src = get_src(bld_base, path.path[idx_lvl]->arr.index);
-           idx_src = cast_type(bld_base, idx_src, nir_type_uint, 32);
-           LLVMValueRef array_off = lp_build_mul(&bld_base->uint_bld, lp_build_const_int_vec(bld_base->base.gallivm, bld_base->base.type, size),
-                                               idx_src);
-           if (offset)
-             offset = lp_build_add(&bld_base->uint_bld, offset, array_off);
-           else
-             offset = array_off;
+            LLVMValueRef idx_src = get_src(bld_base, path.path[idx_lvl]->arr.index);
+            idx_src = cast_type(bld_base, idx_src, nir_type_uint, 32);
+            LLVMValueRef array_off = lp_build_mul(&bld_base->uint_bld, lp_build_const_int_vec(bld_base->base.gallivm, bld_base->base.type, size),
+                                                  idx_src);
+            if (offset)
+               offset = lp_build_add(&bld_base->uint_bld, offset, array_off);
+            else
+               offset = array_off;
          }
       } else
          unreachable("Uhandled deref type in get_deref_instr_offset");