summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConnor Abbott <cwabbott0@gmail.com>2024-04-04 08:12:22 -0400
committerMarge Bot <emma+marge@anholt.net>2024-04-26 12:55:13 +0000
commitb2cf2dfd78db607b2966239afba3a96145a59142 (patch)
tree02c7575712a0796d05832d39d8a1e4896b01244d
parent81015b262082e3228233e1d142b431b9cfaee883 (diff)
ir3/ra: Use ra_reg_get_num() for validating num
This is what the rest of ra validation uses, because it returns the correct thing for arrays (i.e. the base of the array, instead of the actual register accessed). num is sometimes not set, so it was causing spurious assertion failures. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22075>
-rw-r--r--src/freedreno/ir3/ir3_ra_validate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/freedreno/ir3/ir3_ra_validate.c b/src/freedreno/ir3/ir3_ra_validate.c
index 8d4e726149a..4537c6d959e 100644
--- a/src/freedreno/ir3/ir3_ra_validate.c
+++ b/src/freedreno/ir3/ir3_ra_validate.c
@@ -193,7 +193,7 @@ validate_simple(struct ra_val_ctx *ctx, struct ir3_instruction *instr)
foreach_dst_if (dst, instr, validate_reg_is_dst) {
if (ctx->shared_ra && !(dst->flags & IR3_REG_SHARED))
continue;
- validate_assert(ctx, dst->num != INVALID_REG);
+ validate_assert(ctx, ra_reg_get_num(dst) != INVALID_REG);
unsigned dst_max = ra_reg_get_physreg(dst) + reg_size(dst);
validate_assert(ctx, dst_max <= get_file_size(ctx, dst));
if (dst->tied)
@@ -203,7 +203,7 @@ validate_simple(struct ra_val_ctx *ctx, struct ir3_instruction *instr)
foreach_src_if (src, instr, validate_reg_is_src) {
if (ctx->shared_ra && !(src->flags & IR3_REG_SHARED))
continue;
- validate_assert(ctx, src->num != INVALID_REG);
+ validate_assert(ctx, ra_reg_get_num(src) != INVALID_REG);
unsigned src_max = ra_reg_get_physreg(src) + reg_size(src);
validate_assert(ctx, src_max <= get_file_size(ctx, src));
}