mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
ir3: Validate tied sources better
Catch when we try to propagate an immediate or const, which can happen if we forget to specify the valid flags for the instruction, and make sure that it's the same size and type. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22075>
This commit is contained in:
parent
3c71667dda
commit
79c89a3670
1 changed files with 2 additions and 0 deletions
|
|
@ -92,6 +92,8 @@ validate_src(struct ir3_validate_ctx *ctx, struct ir3_instruction *instr,
|
|||
|
||||
if (reg->tied) {
|
||||
validate_assert(ctx, reg->tied->tied == reg);
|
||||
validate_assert(ctx, reg_class_flags(reg) == reg_class_flags(reg->tied));
|
||||
validate_assert(ctx, !(reg->flags & (IR3_REG_CONST | IR3_REG_IMMED)));
|
||||
bool found = false;
|
||||
foreach_dst (dst, instr) {
|
||||
if (dst == reg->tied) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue