summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-03-30 03:13:37 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:25 +0200
commitb0d5572abfe1f14e02d8219f0a4d7dd09ff36fd1 (patch)
tree434c9473dafdf0a2b54e8f6d662141da71560005 /src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp
parentspirv: Fix default output attribute initialization (diff)
downloadyuzu-b0d5572abfe1f14e02d8219f0a4d7dd09ff36fd1.tar
yuzu-b0d5572abfe1f14e02d8219f0a4d7dd09ff36fd1.tar.gz
yuzu-b0d5572abfe1f14e02d8219f0a4d7dd09ff36fd1.tar.bz2
yuzu-b0d5572abfe1f14e02d8219f0a4d7dd09ff36fd1.tar.lz
yuzu-b0d5572abfe1f14e02d8219f0a4d7dd09ff36fd1.tar.xz
yuzu-b0d5572abfe1f14e02d8219f0a4d7dd09ff36fd1.tar.zst
yuzu-b0d5572abfe1f14e02d8219f0a4d7dd09ff36fd1.zip
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:
case Flow::EndClass::IndirectBranch:
root.insert(ip, *pool.Create(SetIndirectBranchVariable{}, block.branch_reg,
block.branch_offset));
- for (Flow::Block* const branch : block.indirect_branches) {
- const Node indirect_label{local_labels.at(branch)};
- Statement* cond{pool.Create(IndirectBranchCond{}, branch->begin.Offset())};
+ for (const Flow::IndirectBranch& indirect : block.indirect_branches) {
+ const Node indirect_label{local_labels.at(indirect.block)};
+ Statement* cond{pool.Create(IndirectBranchCond{}, indirect.address)};
Statement* goto_stmt{pool.Create(Goto{}, cond, indirect_label, &root_stmt)};
gotos.push_back(root.insert(ip, *goto_stmt));
}