mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
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:
parent
cac60c39a9
commit
48d716a05f
1 changed files with 4 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue