mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
ir3/legalize: don't allow end instruction as jump target on a5xx
From experiments it appears that (jp) flag on "end" instruction has no effect (at least on a5xx). This means that we should insert "(jp)nop" before it, which is what blob is doing too. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35331>
This commit is contained in:
parent
e1d54be524
commit
760c96628d
1 changed files with 9 additions and 0 deletions
|
|
@ -1171,6 +1171,15 @@ mark_jp(struct ir3_block *block)
|
|||
|
||||
struct ir3_instruction *target =
|
||||
list_first_entry(&block->instr_list, struct ir3_instruction, node);
|
||||
|
||||
/* Add nop instruction for (jp) flag since it has no effect on a5xx when set
|
||||
* on the end instruction.
|
||||
*/
|
||||
if (target->opc == OPC_END && block->shader->compiler->gen == 5) {
|
||||
struct ir3_builder build = ir3_builder_at(ir3_before_instr(target));
|
||||
target = ir3_NOP(&build);
|
||||
}
|
||||
|
||||
target->flags |= IR3_INSTR_JP;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue