mirror of
https://github.com/yuzu-emu/yuzu-android
synced 2024-12-26 21:11:21 -08:00
shader: Fix loop safety to SSA pass
This commit is contained in:
parent
8fb2048934
commit
7ac55c2a75
@ -750,7 +750,9 @@ private:
|
|||||||
} else {
|
} else {
|
||||||
IR::Block* const init_block{block_pool.Create(inst_pool)};
|
IR::Block* const init_block{block_pool.Create(inst_pool)};
|
||||||
IR::IREmitter ir{*init_block};
|
IR::IREmitter ir{*init_block};
|
||||||
ir.SetLoopSafetyVariable(this_loop_id, ir.Imm32(0x2000));
|
|
||||||
|
static constexpr u32 SAFETY_THRESHOLD = 0x2000;
|
||||||
|
ir.SetLoopSafetyVariable(this_loop_id, ir.Imm32(SAFETY_THRESHOLD));
|
||||||
|
|
||||||
if (current_block) {
|
if (current_block) {
|
||||||
current_block->AddBranch(init_block);
|
current_block->AddBranch(init_block);
|
||||||
|
@ -338,7 +338,7 @@ void VisitInst(Pass& pass, IR::Block* block, IR::Inst& inst) {
|
|||||||
pass.WriteVariable(GotoVariable{inst.Arg(0).U32()}, block, inst.Arg(1));
|
pass.WriteVariable(GotoVariable{inst.Arg(0).U32()}, block, inst.Arg(1));
|
||||||
break;
|
break;
|
||||||
case IR::Opcode::SetLoopSafetyVariable:
|
case IR::Opcode::SetLoopSafetyVariable:
|
||||||
pass.WriteVariable(LoopSafetyVariable{inst.Arg(0).U32()}, block, inst.Arg(0));
|
pass.WriteVariable(LoopSafetyVariable{inst.Arg(0).U32()}, block, inst.Arg(1));
|
||||||
break;
|
break;
|
||||||
case IR::Opcode::SetIndirectBranchVariable:
|
case IR::Opcode::SetIndirectBranchVariable:
|
||||||
pass.WriteVariable(IndirectBranchVariable{}, block, inst.Arg(0));
|
pass.WriteVariable(IndirectBranchVariable{}, block, inst.Arg(0));
|
||||||
|
Loading…
Reference in New Issue
Block a user