diff options
Diffstat (limited to 'src/shader_recompiler/frontend/maxwell/control_flow.cpp')
| -rw-r--r-- | src/shader_recompiler/frontend/maxwell/control_flow.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/shader_recompiler/frontend/maxwell/control_flow.cpp b/src/shader_recompiler/frontend/maxwell/control_flow.cpp index eb0f7c8d1..1a4ee4f6c 100644 --- a/src/shader_recompiler/frontend/maxwell/control_flow.cpp +++ b/src/shader_recompiler/frontend/maxwell/control_flow.cpp | |||
| @@ -197,7 +197,7 @@ Function::Function(ObjectPool<Block>& block_pool, Location start_address) | |||
| 197 | }} {} | 197 | }} {} |
| 198 | 198 | ||
| 199 | CFG::CFG(Environment& env_, ObjectPool<Block>& block_pool_, Location start_address) | 199 | CFG::CFG(Environment& env_, ObjectPool<Block>& block_pool_, Location start_address) |
| 200 | : env{env_}, block_pool{block_pool_} { | 200 | : env{env_}, block_pool{block_pool_}, program_start{start_address} { |
| 201 | functions.emplace_back(block_pool, start_address); | 201 | functions.emplace_back(block_pool, start_address); |
| 202 | for (FunctionId function_id = 0; function_id < functions.size(); ++function_id) { | 202 | for (FunctionId function_id = 0; function_id < functions.size(); ++function_id) { |
| 203 | while (!functions[function_id].labels.empty()) { | 203 | while (!functions[function_id].labels.empty()) { |
| @@ -427,9 +427,9 @@ void CFG::AnalyzeBRA(Block* block, FunctionId function_id, Location pc, Instruct | |||
| 427 | 427 | ||
| 428 | CFG::AnalysisState CFG::AnalyzeBRX(Block* block, Location pc, Instruction inst, bool is_absolute, | 428 | CFG::AnalysisState CFG::AnalyzeBRX(Block* block, Location pc, Instruction inst, bool is_absolute, |
| 429 | FunctionId function_id) { | 429 | FunctionId function_id) { |
| 430 | const std::optional brx_table{TrackIndirectBranchTable(env, pc, block->begin)}; | 430 | const std::optional brx_table{TrackIndirectBranchTable(env, pc, program_start)}; |
| 431 | if (!brx_table) { | 431 | if (!brx_table) { |
| 432 | TrackIndirectBranchTable(env, pc, block->begin); | 432 | TrackIndirectBranchTable(env, pc, program_start); |
| 433 | throw NotImplementedException("Failed to track indirect branch"); | 433 | throw NotImplementedException("Failed to track indirect branch"); |
| 434 | } | 434 | } |
| 435 | const IR::FlowTest flow_test{inst.branch.flow_test}; | 435 | const IR::FlowTest flow_test{inst.branch.flow_test}; |