mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-11 00:30:44 +01:00
ir3: Use foreach_instr_safe in ir3_shared_folding
When processing the last instruction prior to the block terminator, ir3_shader_folding can append a new instruction prior to the terminator, so the `current_instruction->next == new_instruciton` instead of `current_instruction->next == terminator` which leads to the assert in `foreach_instr` being hit, so use `foreach_instr_safe`. Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31478>
This commit is contained in:
parent
5ba00df1f9
commit
581c99b30c
1 changed files with 1 additions and 1 deletions
|
|
@ -120,7 +120,7 @@ ir3_shared_fold(struct ir3 *ir)
|
|||
* reverse to try and convert an entire phi-web in one go.
|
||||
*/
|
||||
foreach_block_rev (block, &ir->block_list) {
|
||||
foreach_instr (instr, &block->instr_list) {
|
||||
foreach_instr_safe (instr, &block->instr_list) {
|
||||
progress |= try_shared_folding(instr, mem_ctx);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue