ir3: disallow immediates for shfl src1

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: d43f39678c ("ir3: make backend aware of shfl:")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31457>
This commit is contained in:
Job Noorman 2024-10-01 10:27:48 +02:00 committed by Marge Bot
parent 306cc0e0d5
commit 211616cc98

View file

@ -1359,8 +1359,12 @@ ir3_valid_flags(struct ir3_instruction *instr, unsigned n, unsigned flags)
if (instr->opc == OPC_STC && n == 1)
valid_flags |= IR3_REG_SHARED;
if (instr->opc == OPC_SHFL && n == 1)
valid_flags |= IR3_REG_SHARED;
if (instr->opc == OPC_SHFL) {
if (n == 0)
valid_flags &= ~IR3_REG_IMMED;
else if (n == 1)
valid_flags |= IR3_REG_SHARED;
}
if (flags & ~valid_flags)
return false;