Archived
1
0
Fork 0
forked from Mirror/Ryujinx

Fix shader RegisterUsage pass only taking first operation dest into account (#7131)

* Fix shader RegisterUsage pass only taking first operation dest into account

* Shader cache version bump
This commit is contained in:
gdkchan 2024-07-30 21:57:55 -03:00 committed by GitHub
parent 698e36bbd2
commit 56b2f84702
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 3 deletions

View file

@ -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 = 6921; private const uint CodeGenVersion = 7131;
private const string SharedTocFileName = "shared.toc"; private const string SharedTocFileName = "shared.toc";
private const string SharedDataFileName = "shared.data"; private const string SharedDataFileName = "shared.data";

View file

@ -155,9 +155,14 @@ namespace Ryujinx.Graphics.Shader.Translation
localInputs[block.Index] |= GetMask(register) & ~localOutputs[block.Index]; localInputs[block.Index] |= GetMask(register) & ~localOutputs[block.Index];
} }
if (operation.Dest != null && operation.Dest.Type == OperandType.Register) for (int dstIndex = 0; dstIndex < operation.DestsCount; dstIndex++)
{ {
localOutputs[block.Index] |= GetMask(operation.Dest.GetRegister()); Operand dest = operation.GetDest(dstIndex);
if (dest != null && dest.Type == OperandType.Register)
{
localOutputs[block.Index] |= GetMask(dest.GetRegister());
}
} }
} }
} }