Mesa (master): freedreno/ir3: use const_index accessors

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu May 14 03:52:05 UTC 2020


Module: Mesa
Branch: master
Commit: ea6b404294a0d6d83360bd0c5c8ab4e6f44c3555
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ea6b404294a0d6d83360bd0c5c8ab4e6f44c3555

Author: Rob Clark <robdclark at chromium.org>
Date:   Wed May  6 13:14:39 2020 -0700

freedreno/ir3: use const_index accessors

Cleans up a couple spots that were still open-coding this.

Signed-off-by: Rob Clark <robdclark at chromium.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg at google.com>
Reviewed-by: Eric Anholt <eric at anholt.net>

---

 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:



More information about the mesa-commit mailing list