Mesa (master): freedreno/ir3/validate: also check instr->address
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jun 16 21:14:02 UTC 2020
Module: Mesa
Branch: master
Commit: 1bee79996b215be271b6dd76d145e3c5bb55af3f
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1bee79996b215be271b6dd76d145e3c5bb55af3f
Author: Rob Clark <robdclark at chromium.org>
Date: Sun Jun 7 11:11:23 2020 -0700
freedreno/ir3/validate: also check instr->address
Verify that instructions which have a relative src and/or dest, have
`instr->address`.
Signed-off-by: Rob Clark <robdclark at chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5280>
---
src/freedreno/ir3/ir3_validate.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/freedreno/ir3/ir3_validate.c b/src/freedreno/ir3/ir3_validate.c
index ec8bb937da8..58b5bee1e87 100644
--- a/src/freedreno/ir3/ir3_validate.c
+++ b/src/freedreno/ir3/ir3_validate.c
@@ -77,7 +77,16 @@ validate_instr(struct ir3_validate_ctx *ctx, struct ir3_instruction *instr)
{
struct ir3_register *last_reg = NULL;
+ if (writes_gpr(instr)) {
+ if (instr->regs[0]->flags & IR3_REG_RELATIV) {
+ validate_assert(ctx, instr->address);
+ }
+ }
+
foreach_src_n (reg, n, instr) {
+ if (reg->flags & IR3_REG_RELATIV)
+ validate_assert(ctx, instr->address);
+
validate_src(ctx, reg);
/* Validate that all src's are either half of full.
More information about the mesa-commit
mailing list