mirror of
https://github.com/Ryujinx-NX/Ryujinx.git
synced 2024-11-14 21:17:43 -07:00
Fix lost copy and swap problem on shader SSA deconstruction (#6455)
* Fix lost copy on shader SSA deconstruction * Shader cache version bump
This commit is contained in:
parent
a3a63d4394
commit
5a900f38c5
@ -22,7 +22,7 @@ namespace Ryujinx.Graphics.Gpu.Shader.DiskCache
|
|||||||
private const ushort FileFormatVersionMajor = 1;
|
private const ushort FileFormatVersionMajor = 1;
|
||||||
private const ushort FileFormatVersionMinor = 2;
|
private const ushort FileFormatVersionMinor = 2;
|
||||||
private const uint FileFormatVersionPacked = ((uint)FileFormatVersionMajor << 16) | FileFormatVersionMinor;
|
private const uint FileFormatVersionPacked = ((uint)FileFormatVersionMajor << 16) | FileFormatVersionMinor;
|
||||||
private const uint CodeGenVersion = 6253;
|
private const uint CodeGenVersion = 6455;
|
||||||
|
|
||||||
private const string SharedTocFileName = "shared.toc";
|
private const string SharedTocFileName = "shared.toc";
|
||||||
private const string SharedDataFileName = "shared.data";
|
private const string SharedDataFileName = "shared.data";
|
||||||
|
@ -24,17 +24,21 @@ namespace Ryujinx.Graphics.Shader.StructuredIr
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Operand temp = OperandHelper.Local();
|
||||||
|
|
||||||
for (int index = 0; index < phi.SourcesCount; index++)
|
for (int index = 0; index < phi.SourcesCount; index++)
|
||||||
{
|
{
|
||||||
Operand src = phi.GetSource(index);
|
Operand src = phi.GetSource(index);
|
||||||
|
|
||||||
BasicBlock srcBlock = phi.GetBlock(index);
|
BasicBlock srcBlock = phi.GetBlock(index);
|
||||||
|
|
||||||
Operation copyOp = new(Instruction.Copy, phi.Dest, src);
|
Operation copyOp = new(Instruction.Copy, temp, src);
|
||||||
|
|
||||||
srcBlock.Append(copyOp);
|
srcBlock.Append(copyOp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Operation copyOp2 = new(Instruction.Copy, phi.Dest, temp);
|
||||||
|
|
||||||
|
nextNode = block.Operations.AddAfter(node, copyOp2).Next;
|
||||||
block.Operations.Remove(node);
|
block.Operations.Remove(node);
|
||||||
|
|
||||||
node = nextNode;
|
node = nextNode;
|
||||||
|
Loading…
Reference in New Issue
Block a user