mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-06 13:30:00 +00:00
refactor(shader): short-circuit terminal reachability checks
This commit is contained in:
1 parent
578b8311ac
commit
0f63ef9da0
1 file changed
+2
@@ -482,6 +482,8 @@ bool canReachBefore(const ControlFlowGraph& graph, std::uint32_t start, std::uin
|
||||
}
|
||||
|
||||
bool reachesWithinIteration(const ControlFlowGraph& graph, const NaturalLoop& loop, std::uint32_t start, std::uint32_t target) {
|
||||
if (start == target) return true;
|
||||
if (start == loop.continueBlock || start == loop.mergeBlock) return false;
|
||||
std::vector<std::uint32_t> pending = {start};
|
||||
std::vector<bool> visited(graph.blocks.size(), false);
|
||||
while (!pending.empty()) {
|
||||
|
||||
Reference in new issue
Block a user