mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2025-06-12 12:27:57 -05:00
ShaderCache: Order Phi Arguments from farthest away to nearest.
This commit is contained in:
@ -378,6 +378,13 @@ void SsaRewritePass(IR::Program& program) {
|
||||
for (auto block = program.post_order_blocks.rbegin(); block != end; ++block) {
|
||||
VisitBlock(pass, *block);
|
||||
}
|
||||
for (auto block = program.post_order_blocks.rbegin(); block != end; ++block) {
|
||||
for (IR::Inst& inst : (*block)->Instructions()) {
|
||||
if (inst.GetOpcode() == IR::Opcode::Phi) {
|
||||
inst.OrderPhiArgs();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Shader::Optimization
|
||||
|
Reference in New Issue
Block a user