Fix lost copy on shader SSA deconstruction
This commit is contained in:
parent
a3a63d4394
commit
34e2657a1f
1 changed files with 6 additions and 2 deletions
|
@ -24,17 +24,21 @@ namespace Ryujinx.Graphics.Shader.StructuredIr
|
|||
continue;
|
||||
}
|
||||
|
||||
Operand temp = OperandHelper.Local();
|
||||
|
||||
for (int index = 0; index < phi.SourcesCount; index++)
|
||||
{
|
||||
Operand src = phi.GetSource(index);
|
||||
|
||||
BasicBlock srcBlock = phi.GetBlock(index);
|
||||
|
||||
Operation copyOp = new(Instruction.Copy, phi.Dest, src);
|
||||
Operation copyOp = new(Instruction.Copy, temp, src);
|
||||
|
||||
srcBlock.Append(copyOp);
|
||||
}
|
||||
|
||||
Operation copyOp2 = new(Instruction.Copy, phi.Dest, temp);
|
||||
|
||||
nextNode = block.Operations.AddAfter(node, copyOp2).Next;
|
||||
block.Operations.Remove(node);
|
||||
|
||||
node = nextNode;
|
||||
|
|
Loading…
Add table
Reference in a new issue