diff --git a/src/panfrost/compiler/valhall/va_validate.c b/src/panfrost/compiler/valhall/va_validate.c index ffaecd2c069..3465ac086e5 100644 --- a/src/panfrost/compiler/valhall/va_validate.c +++ b/src/panfrost/compiler/valhall/va_validate.c @@ -72,6 +72,13 @@ can_use_two_fau_indices(enum bi_opcode op) op != BI_OPCODE_BLEND; } +static bool +can_run_on_message_unit(enum bi_opcode op) +{ + return bi_opcode_props[op].message != BIFROST_MESSAGE_NONE || + op == BI_OPCODE_ATEST || op == BI_OPCODE_BLEND; +} + static bool fau_is_special(enum bir_fau fau) { @@ -114,6 +121,12 @@ fau_state_special(struct fau_state *fau, bi_index idx, enum bi_opcode op) return false; } + /* Instructions executed by the messaging unit should not encode WARP_ID or + * anything from special page 3. */ + if (can_run_on_message_unit(op) && + (va_fau_page(idx.value) == 3 || idx.value == BIR_FAU_WARP_ID)) + return false; + return fau->uniform_slot == -1 || can_use_two_fau_indices(op); }