diff options
| author | 2021-03-29 22:13:37 -0300 | |
|---|---|---|
| committer | 2021-07-22 21:51:25 -0400 | |
| commit | b0d5572abfe1f14e02d8219f0a4d7dd09ff36fd1 (patch) | |
| tree | 434c9473dafdf0a2b54e8f6d662141da71560005 /src/shader_recompiler/frontend/maxwell/control_flow.cpp | |
| parent | spirv: Fix default output attribute initialization (diff) | |
| download | yuzu-b0d5572abfe1f14e02d8219f0a4d7dd09ff36fd1.tar.gz yuzu-b0d5572abfe1f14e02d8219f0a4d7dd09ff36fd1.tar.xz yuzu-b0d5572abfe1f14e02d8219f0a4d7dd09ff36fd1.zip | |
shader: Fix indirect branches to scheduler instructions
Diffstat (limited to 'src/shader_recompiler/frontend/maxwell/control_flow.cpp')
| -rw-r--r-- | src/shader_recompiler/frontend/maxwell/control_flow.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/shader_recompiler/frontend/maxwell/control_flow.cpp b/src/shader_recompiler/frontend/maxwell/control_flow.cpp index 1e9b8e426..784f9df8a 100644 --- a/src/shader_recompiler/frontend/maxwell/control_flow.cpp +++ b/src/shader_recompiler/frontend/maxwell/control_flow.cpp | |||
| @@ -434,7 +434,10 @@ CFG::AnalysisState CFG::AnalyzeBRX(Block* block, Location pc, Instruction inst, | |||
| 434 | block->indirect_branches.reserve(targets.size()); | 434 | block->indirect_branches.reserve(targets.size()); |
| 435 | for (const u32 target : targets) { | 435 | for (const u32 target : targets) { |
| 436 | Block* const branch{AddLabel(block, block->stack, target, function_id)}; | 436 | Block* const branch{AddLabel(block, block->stack, target, function_id)}; |
| 437 | block->indirect_branches.push_back(branch); | 437 | block->indirect_branches.push_back({ |
| 438 | .block{branch}, | ||
| 439 | .address{target}, | ||
| 440 | }); | ||
| 438 | } | 441 | } |
| 439 | block->cond = IR::Condition{true}; | 442 | block->cond = IR::Condition{true}; |
| 440 | block->end = pc + 1; | 443 | block->end = pc + 1; |
| @@ -530,8 +533,8 @@ std::string CFG::Dot() const { | |||
| 530 | } | 533 | } |
| 531 | break; | 534 | break; |
| 532 | case EndClass::IndirectBranch: | 535 | case EndClass::IndirectBranch: |
| 533 | for (Block* const branch : block.indirect_branches) { | 536 | for (const IndirectBranch& branch : block.indirect_branches) { |
| 534 | add_branch(branch, false); | 537 | add_branch(branch.block, false); |
| 535 | } | 538 | } |
| 536 | break; | 539 | break; |
| 537 | case EndClass::Call: | 540 | case EndClass::Call: |