aboutsummaryrefslogtreecommitdiff
path: root/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-06-15 17:00:07 -0300
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-22 21:51:35 -0400
commit7ac55c2a750f00b41582a86eba5a44dcd781ae98 (patch)
treeb0f904e02d8b910bf96525f202a051afae0a45eb /src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp
parent8fb204893430de2d5c30e008e98db313f890f447 (diff)
shader: Fix loop safety to SSA pass
Diffstat (limited to 'src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp')
-rw-r--r--src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp b/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp
index b2b8c492a0..605ec38e13 100644
--- a/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp
+++ b/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp
@@ -750,7 +750,9 @@ private:
} else {
IR::Block* const init_block{block_pool.Create(inst_pool)};
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) {
current_block->AddBranch(init_block);