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 <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22891>
This commit is contained in:
Alyssa Rosenzweig 2023-04-15 09:39:28 -04:00
parent 9337f6a865
commit a561a6c468

View file

@ -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);
}
}