freedreno: Use nir_ instead of nir_build_ helpers
authorKonstantin Seurer <konstantin.seurer@gmail.com>
Mon, 26 Jun 2023 12:17:14 +0000 (14:17 +0200)
committerMarge Bot <emma+marge@anholt.net>
Tue, 27 Jun 2023 17:37:54 +0000 (17:37 +0000)
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23858>

src/freedreno/ir3/ir3_nir_lower_64b.c

index 9782ff6..d260ff8 100644 (file)
@@ -118,8 +118,7 @@ lower_64b_intrinsics(nir_builder *b, nir_instr *instr, void *unused)
             nir_ssa_for_src(b, intr->src[0], 1),
             nir_imm_int(b, 4));
 
-      nir_ssa_def *upper = nir_build_load_kernel_input(
-            b, 1, 32, offset);
+      nir_ssa_def *upper = nir_load_kernel_input(b, 1, 32, offset);
 
       return nir_pack_64_2x32_split(b, def, upper);
    }
@@ -258,12 +257,12 @@ lower_64b_global(nir_builder *b, nir_instr *instr, void *unused)
     */
 
    if (intr->intrinsic == nir_intrinsic_global_atomic) {
-      return nir_build_global_atomic_ir3(
+      return nir_global_atomic_ir3(
             b, nir_dest_bit_size(intr->dest), addr,
             nir_ssa_for_src(b, intr->src[1], 1),
          .atomic_op = nir_intrinsic_atomic_op(intr));
    } else if (intr->intrinsic == nir_intrinsic_global_atomic_swap) {
-      return nir_build_global_atomic_swap_ir3(
+      return nir_global_atomic_swap_ir3(
          b, nir_dest_bit_size(intr->dest), addr,
          nir_ssa_for_src(b, intr->src[1], 1),
          nir_ssa_for_src(b, intr->src[2], 1),
@@ -275,7 +274,7 @@ lower_64b_global(nir_builder *b, nir_instr *instr, void *unused)
       nir_ssa_def *components[num_comp];
       for (unsigned off = 0; off < num_comp;) {
          unsigned c = MIN2(num_comp - off, 4);
-         nir_ssa_def *val = nir_build_load_global_ir3(
+         nir_ssa_def *val = nir_load_global_ir3(
                b, c, nir_dest_bit_size(intr->dest),
                addr, nir_imm_int(b, off));
          for (unsigned i = 0; i < c; i++) {
@@ -289,7 +288,7 @@ lower_64b_global(nir_builder *b, nir_instr *instr, void *unused)
       for (unsigned off = 0; off < num_comp; off += 4) {
          unsigned c = MIN2(num_comp - off, 4);
          nir_ssa_def *v = nir_channels(b, value, BITFIELD_MASK(c) << off);
-         nir_build_store_global_ir3(b, v, addr, nir_imm_int(b, off));
+         nir_store_global_ir3(b, v, addr, nir_imm_int(b, off));
       }
       return NIR_LOWER_INSTR_PROGRESS_REPLACE;
    }