freedreno/ir3: use const_index accessors
authorRob Clark <robdclark@chromium.org>
Wed, 6 May 2020 20:14:39 +0000 (13:14 -0700)
committerRob Clark <robdclark@chromium.org>
Thu, 14 May 2020 03:24:38 +0000 (20:24 -0700)
Cleans up a couple spots that were still open-coding this.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/freedreno/ir3/ir3_a4xx.c
src/freedreno/ir3/ir3_a6xx.c

index 444b7c592f2dc88cedbc41b00d6a690240dacc00..594fb9cd021d0d9b6df15adc6746e9dd3b54d676 100644 (file)
@@ -77,7 +77,7 @@ emit_intrinsic_store_ssbo(struct ir3_context *ctx, nir_intrinsic_instr *intr)
         * it is more a PITA than that, since blob ends up loading the
         * masked components and writing them back out.
         */
-       unsigned wrmask = intr->const_index[0];
+       unsigned wrmask = nir_intrinsic_write_mask(intr);
        unsigned ncomp = ffs(~wrmask) - 1;
 
        /* can this be non-const buffer_index?  how do we handle that? */
index 6f0ba54dc36a186e3c87a5e9485134250681db0a..d4cb74c39bd48be05661ebad30cd643eda8648b2 100644 (file)
@@ -107,7 +107,7 @@ emit_intrinsic_store_ssbo(struct ir3_context *ctx, nir_intrinsic_instr *intr)
         * it is more a PITA than that, since blob ends up loading the
         * masked components and writing them back out.
         */
-       unsigned wrmask = intr->const_index[0];
+       unsigned wrmask = nir_intrinsic_write_mask(intr);
        unsigned ncomp = ffs(~wrmask) - 1;
 
        /* src0 is offset, src1 is value: