From a561a6c4684922758b5fa3dedb9ee3bc4229a4fa Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Sat, 15 Apr 2023 09:39:28 -0400 Subject: [PATCH] agx: Validate that collect sources are the same size RA asserts this, but by then if you've messed it up, the failure is inscrutable. Let's check it in the validator for more pleasant debugging. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/asahi/compiler/agx_validate.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/asahi/compiler/agx_validate.c b/src/asahi/compiler/agx_validate.c index ff6bbb8d6c7..ae17f7f9a0e 100644 --- a/src/asahi/compiler/agx_validate.c +++ b/src/asahi/compiler/agx_validate.c @@ -96,6 +96,8 @@ agx_validate_sources(agx_instr *I) */ agx_validate_assert(src.size == AGX_SIZE_16); agx_validate_assert(src.value < (1 << (ldst ? 16 : 8))); + } else if (I->op == AGX_OPCODE_COLLECT && !agx_is_null(src)) { + agx_validate_assert(src.size == I->src[0].size); } }