diff options
| -rw-r--r-- | src/video_core/shader/control_flow.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/video_core/shader/control_flow.cpp b/src/video_core/shader/control_flow.cpp index 5963cf214..4c8971615 100644 --- a/src/video_core/shader/control_flow.cpp +++ b/src/video_core/shader/control_flow.cpp | |||
| @@ -547,13 +547,13 @@ bool TryQuery(CFGRebuildState& state) { | |||
| 547 | gather_labels(q2.ssy_stack, state.ssy_labels, block); | 547 | gather_labels(q2.ssy_stack, state.ssy_labels, block); |
| 548 | gather_labels(q2.pbk_stack, state.pbk_labels, block); | 548 | gather_labels(q2.pbk_stack, state.pbk_labels, block); |
| 549 | if (std::holds_alternative<SingleBranch>(*block.branch)) { | 549 | if (std::holds_alternative<SingleBranch>(*block.branch)) { |
| 550 | const auto branch = std::get_if<SingleBranch>(block.branch.get()); | 550 | auto* branch = std::get_if<SingleBranch>(block.branch.get()); |
| 551 | if (!branch->condition.IsUnconditional()) { | 551 | if (!branch->condition.IsUnconditional()) { |
| 552 | q2.address = block.end + 1; | 552 | q2.address = block.end + 1; |
| 553 | state.queries.push_back(q2); | 553 | state.queries.push_back(q2); |
| 554 | } | 554 | } |
| 555 | 555 | ||
| 556 | Query conditional_query{q2}; | 556 | auto& conditional_query = state.queries.emplace_back(q2); |
| 557 | if (branch->is_sync) { | 557 | if (branch->is_sync) { |
| 558 | if (branch->address == unassigned_branch) { | 558 | if (branch->address == unassigned_branch) { |
| 559 | branch->address = conditional_query.ssy_stack.top(); | 559 | branch->address = conditional_query.ssy_stack.top(); |
| @@ -567,15 +567,15 @@ bool TryQuery(CFGRebuildState& state) { | |||
| 567 | conditional_query.pbk_stack.pop(); | 567 | conditional_query.pbk_stack.pop(); |
| 568 | } | 568 | } |
| 569 | conditional_query.address = branch->address; | 569 | conditional_query.address = branch->address; |
| 570 | state.queries.push_back(std::move(conditional_query)); | ||
| 571 | return true; | 570 | return true; |
| 572 | } | 571 | } |
| 573 | const auto multi_branch = std::get_if<MultiBranch>(block.branch.get()); | 572 | |
| 573 | const auto* multi_branch = std::get_if<MultiBranch>(block.branch.get()); | ||
| 574 | for (const auto& branch_case : multi_branch->branches) { | 574 | for (const auto& branch_case : multi_branch->branches) { |
| 575 | Query conditional_query{q2}; | 575 | auto& conditional_query = state.queries.emplace_back(q2); |
| 576 | conditional_query.address = branch_case.address; | 576 | conditional_query.address = branch_case.address; |
| 577 | state.queries.push_back(std::move(conditional_query)); | ||
| 578 | } | 577 | } |
| 578 | |||
| 579 | return true; | 579 | return true; |
| 580 | } | 580 | } |
| 581 | 581 | ||