From ea6b404294a0d6d83360bd0c5c8ab4e6f44c3555 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Wed, 6 May 2020 13:14:39 -0700 Subject: [PATCH] freedreno/ir3: use const_index accessors Cleans up a couple spots that were still open-coding this. Signed-off-by: Rob Clark Reviewed-by: Kristian H. Kristensen Reviewed-by: Eric Anholt --- src/freedreno/ir3/ir3_a4xx.c | 2 +- src/freedreno/ir3/ir3_a6xx.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/freedreno/ir3/ir3_a4xx.c b/src/freedreno/ir3/ir3_a4xx.c index 444b7c592f2..594fb9cd021 100644 --- a/src/freedreno/ir3/ir3_a4xx.c +++ b/src/freedreno/ir3/ir3_a4xx.c @@ -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? */ diff --git a/src/freedreno/ir3/ir3_a6xx.c b/src/freedreno/ir3/ir3_a6xx.c index 6f0ba54dc36..d4cb74c39bd 100644 --- a/src/freedreno/ir3/ir3_a6xx.c +++ b/src/freedreno/ir3/ir3_a6xx.c @@ -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: -- 2.30.2