summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp')
-rw-r--r--src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp b/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp
index a6e55f61e..c804c2a8e 100644
--- a/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp
+++ b/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp
@@ -446,9 +446,9 @@ private:
446 case Flow::EndClass::IndirectBranch: 446 case Flow::EndClass::IndirectBranch:
447 root.insert(ip, *pool.Create(SetIndirectBranchVariable{}, block.branch_reg, 447 root.insert(ip, *pool.Create(SetIndirectBranchVariable{}, block.branch_reg,
448 block.branch_offset)); 448 block.branch_offset));
449 for (Flow::Block* const branch : block.indirect_branches) { 449 for (const Flow::IndirectBranch& indirect : block.indirect_branches) {
450 const Node indirect_label{local_labels.at(branch)}; 450 const Node indirect_label{local_labels.at(indirect.block)};
451 Statement* cond{pool.Create(IndirectBranchCond{}, branch->begin.Offset())}; 451 Statement* cond{pool.Create(IndirectBranchCond{}, indirect.address)};
452 Statement* goto_stmt{pool.Create(Goto{}, cond, indirect_label, &root_stmt)}; 452 Statement* goto_stmt{pool.Create(Goto{}, cond, indirect_label, &root_stmt)};
453 gotos.push_back(root.insert(ip, *goto_stmt)); 453 gotos.push_back(root.insert(ip, *goto_stmt));
454 } 454 }