mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01:00
shader: Fix FSwizzleAdd folding when going through phi nodes
This commit is contained in:
parent
871c9f1ced
commit
fbf5cdcba0
1 changed files with 2 additions and 2 deletions
|
@ -440,13 +440,13 @@ void FoldFSwizzleAdd(IR::Block& block, IR::Inst& inst) {
|
||||||
// DPdxFine
|
// DPdxFine
|
||||||
if (index.U32() == 1) {
|
if (index.U32() == 1) {
|
||||||
IR::IREmitter ir{block, IR::Block::InstructionList::s_iterator_to(inst)};
|
IR::IREmitter ir{block, IR::Block::InstructionList::s_iterator_to(inst)};
|
||||||
inst.ReplaceUsesWith(ir.DPdxFine(IR::F32{value_2}));
|
inst.ReplaceUsesWith(ir.DPdxFine(IR::F32{inst.Arg(1)}));
|
||||||
}
|
}
|
||||||
} else if (swizzle_value == 0xA5) {
|
} else if (swizzle_value == 0xA5) {
|
||||||
// DPdyFine
|
// DPdyFine
|
||||||
if (index.U32() == 2) {
|
if (index.U32() == 2) {
|
||||||
IR::IREmitter ir{block, IR::Block::InstructionList::s_iterator_to(inst)};
|
IR::IREmitter ir{block, IR::Block::InstructionList::s_iterator_to(inst)};
|
||||||
inst.ReplaceUsesWith(ir.DPdyFine(IR::F32{value_2}));
|
inst.ReplaceUsesWith(ir.DPdyFine(IR::F32{inst.Arg(1)}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue