aboutsummaryrefslogtreecommitdiff
path: root/src/shader_recompiler/frontend/maxwell/control_flow.cpp
diff options
context:
space:
mode:
authorFernandoS27 <fsahmkow27@gmail.com>2021-05-01 14:56:25 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-22 21:51:29 -0400
commit6aff9b447612a7f2cd03f7d9d222c0ec3465a2e7 (patch)
tree71642406f4df7963ea78c55acf622bdf5b85a595 /src/shader_recompiler/frontend/maxwell/control_flow.cpp
parenta2fac91c475f61d006699d88f126bc57310693c6 (diff)
shader: Address feedback
Diffstat (limited to 'src/shader_recompiler/frontend/maxwell/control_flow.cpp')
-rw-r--r--src/shader_recompiler/frontend/maxwell/control_flow.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/shader_recompiler/frontend/maxwell/control_flow.cpp b/src/shader_recompiler/frontend/maxwell/control_flow.cpp
index 298faa03e0..e7abea82f4 100644
--- a/src/shader_recompiler/frontend/maxwell/control_flow.cpp
+++ b/src/shader_recompiler/frontend/maxwell/control_flow.cpp
@@ -209,9 +209,9 @@ CFG::CFG(Environment& env_, ObjectPool<Block>& block_pool_, Location start_addre
}
}
if (exits_to_dispatcher) {
- const auto it = functions[0].blocks.rbegin();
- dispatch_block->begin = it->end + 1;
- dispatch_block->end = it->end + 1;
+ const auto last_block{functions[0].blocks.rbegin()};
+ dispatch_block->begin = last_block->end + 1;
+ dispatch_block->end = last_block->end + 1;
functions[0].blocks.insert(*dispatch_block);
}
}
@@ -481,7 +481,7 @@ CFG::AnalysisState CFG::AnalyzeEXIT(Block* block, FunctionId function_id, Locati
return AnalysisState::Continue;
}
if (exits_to_dispatcher && function_id != 0) {
- throw NotImplementedException("Dispatch EXIT on external function.");
+ throw NotImplementedException("Dispatch EXIT on external function");
}
if (pred != Predicate{true} || flow_test != IR::FlowTest::T) {
if (block->stack.Peek(Token::PEXIT).has_value()) {
@@ -490,9 +490,9 @@ CFG::AnalysisState CFG::AnalyzeEXIT(Block* block, FunctionId function_id, Locati
const IR::Condition cond{flow_test, static_cast<IR::Pred>(pred.index), pred.negated};
if (exits_to_dispatcher) {
block->end = pc;
- block->branch_true = dispatch_block;
block->end_class = EndClass::Branch;
block->cond = cond;
+ block->branch_true = dispatch_block;
block->branch_false = AddLabel(block, block->stack, pc + 1, function_id);
return AnalysisState::Branch;
}