From: Rob Clark Date: Wed, 6 May 2020 20:14:39 +0000 (-0700) Subject: freedreno/ir3: use const_index accessors X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ea6b404294a0d6d83360bd0c5c8ab4e6f44c3555;p=mesa.git 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 --- 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: