mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2025-06-13 20:47:56 -05:00
shader: Fix splits on blocks using indirect branches
This commit is contained in:
@ -21,7 +21,7 @@ void RemoveUnreachableBlocks(IR::Program& program) {
|
||||
if (program.blocks.size() == program.post_order_blocks.size()) {
|
||||
return;
|
||||
}
|
||||
const auto begin{std::next(program.blocks.begin())};
|
||||
const auto begin{program.blocks.begin() + 1};
|
||||
const auto end{program.blocks.end()};
|
||||
const auto pred{[](IR::Block* block) { return block->ImmediatePredecessors().empty(); }};
|
||||
program.blocks.erase(std::remove_if(begin, end, pred), end);
|
||||
|
Reference in New Issue
Block a user