pan/bi: Do not allow passthrough for instructions disallowing temps

Previously we were allowing passthrough to temps without using
bi_reads_temps.

This was causing instructions like CLPER to create undefined encodings.

We now check if the instruction support temps.

Fixes: 4252fb84f4 ("pan/bi: Add passthrough register rewriting helper")
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36006>
This commit is contained in:
Mary Guillemard 2025-07-08 13:07:08 +02:00 committed by Marge Bot
parent cac60c39a9
commit 48d716a05f

View file

@ -1366,6 +1366,10 @@ bi_use_passthrough(bi_instr *ins, bi_index old, enum bifrost_packed_src new,
if ((i == 0 || i == 4) && except_sr)
continue;
if ((new == BIFROST_SRC_PASS_FMA || new == BIFROST_SRC_PASS_ADD) &&
!bi_reads_temps(ins, i))
continue;
if (bi_is_word_equiv(ins->src[i], old)) {
ins->src[i].type = BI_INDEX_PASS;
ins->src[i].value = new;