pan/bi: Disallow FAU special page 3 and WARP_ID on message instructions

This is a constraint that apply on Valhall and later, instructions
should not use FAU special page 3 or WARP_ID if running
on the message unit.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: fd1906afea ("pan/va: Add FAU validation")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33843>
This commit is contained in:
Mary Guillemard 2025-03-03 11:13:35 +00:00 committed by Marge Bot
parent 6df9591905
commit ef0c7382c7

View file

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