freedreno/ir3: small cleanup
authorRob Clark <robdclark@gmail.com>
Sun, 25 Feb 2018 20:05:01 +0000 (15:05 -0500)
committerRob Clark <robdclark@gmail.com>
Mon, 5 Mar 2018 13:05:33 +0000 (08:05 -0500)
Signed-off-by: Rob Clark <robdclark@gmail.com>
src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c

index 1036d2f967c3e7fa2b2193bc4efaaf43ee3e9ad0..38d9ee8e1f049f71d27d4081c2bb5d9b39cd9d3d 100644 (file)
@@ -1475,7 +1475,7 @@ emit_intrinsic_load_shared(struct ir3_context *ctx, nir_intrinsic_instr *intr,
        unsigned base;
 
        offset = get_src(ctx, &intr->src[0])[0];
-       base   = intr->const_index[0];
+       base   = nir_intrinsic_base(intr);
 
        ldl = ir3_LDL(b, offset, 0, create_immed(b, intr->num_components), 0);
        ldl->cat6.src_offset = base;
@@ -1500,8 +1500,8 @@ emit_intrinsic_store_shared(struct ir3_context *ctx, nir_intrinsic_instr *intr)
        value  = get_src(ctx, &intr->src[0]);
        offset = get_src(ctx, &intr->src[1])[0];
 
-       base   = intr->const_index[0];
-       wrmask = intr->const_index[1];
+       base   = nir_intrinsic_base(intr);
+       wrmask = nir_intrinsic_write_mask(intr);
 
        /* Combine groups of consecutive enabled channels in one write
         * message. We use ffs to find the first enabled channel and then ffs on