diff options
author | gdkchan <gab.dark.100@gmail.com> | 2024-07-30 21:57:55 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-30 21:57:55 -0300 |
commit | 56b2f847022a52ad57f41278dfec7d44e606a625 (patch) | |
tree | 746b39f7c6fcac3557a8d5aae52d17f3e6732202 | |
parent | 698e36bbd2c828ce419e1b9f0918c314c18bd9ae (diff) |
Fix shader RegisterUsage pass only taking first operation dest into account (#7131)1.1.1363
* Fix shader RegisterUsage pass only taking first operation dest into account
* Shader cache version bump
-rw-r--r-- | src/Ryujinx.Graphics.Gpu/Shader/DiskCache/DiskCacheHostStorage.cs | 2 | ||||
-rw-r--r-- | src/Ryujinx.Graphics.Shader/Translation/RegisterUsage.cs | 9 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/Ryujinx.Graphics.Gpu/Shader/DiskCache/DiskCacheHostStorage.cs b/src/Ryujinx.Graphics.Gpu/Shader/DiskCache/DiskCacheHostStorage.cs index c4b5a1380..c1f592011 100644 --- a/src/Ryujinx.Graphics.Gpu/Shader/DiskCache/DiskCacheHostStorage.cs +++ b/src/Ryujinx.Graphics.Gpu/Shader/DiskCache/DiskCacheHostStorage.cs | |||
@@ -22,7 +22,7 @@ namespace Ryujinx.Graphics.Gpu.Shader.DiskCache | |||
22 | private const ushort FileFormatVersionMajor = 1; | 22 | private const ushort FileFormatVersionMajor = 1; |
23 | private const ushort FileFormatVersionMinor = 2; | 23 | private const ushort FileFormatVersionMinor = 2; |
24 | private const uint FileFormatVersionPacked = ((uint)FileFormatVersionMajor << 16) | FileFormatVersionMinor; | 24 | private const uint FileFormatVersionPacked = ((uint)FileFormatVersionMajor << 16) | FileFormatVersionMinor; |
25 | private const uint CodeGenVersion = 6921; | 25 | private const uint CodeGenVersion = 7131; |
26 | 26 | ||
27 | private const string SharedTocFileName = "shared.toc"; | 27 | private const string SharedTocFileName = "shared.toc"; |
28 | private const string SharedDataFileName = "shared.data"; | 28 | private const string SharedDataFileName = "shared.data"; |
diff --git a/src/Ryujinx.Graphics.Shader/Translation/RegisterUsage.cs b/src/Ryujinx.Graphics.Shader/Translation/RegisterUsage.cs index e27e47070..1c724223c 100644 --- a/src/Ryujinx.Graphics.Shader/Translation/RegisterUsage.cs +++ b/src/Ryujinx.Graphics.Shader/Translation/RegisterUsage.cs | |||
@@ -155,9 +155,14 @@ namespace Ryujinx.Graphics.Shader.Translation | |||
155 | localInputs[block.Index] |= GetMask(register) & ~localOutputs[block.Index]; | 155 | localInputs[block.Index] |= GetMask(register) & ~localOutputs[block.Index]; |
156 | } | 156 | } |
157 | 157 | ||
158 | if (operation.Dest != null && operation.Dest.Type == OperandType.Register) | 158 | for (int dstIndex = 0; dstIndex < operation.DestsCount; dstIndex++) |
159 | { | 159 | { |
160 | localOutputs[block.Index] |= GetMask(operation.Dest.GetRegister()); | 160 | Operand dest = operation.GetDest(dstIndex); |
161 | |||
162 | if (dest != null && dest.Type == OperandType.Register) | ||
163 | { | ||
164 | localOutputs[block.Index] |= GetMask(dest.GetRegister()); | ||
165 | } | ||
161 | } | 166 | } |
162 | } | 167 | } |
163 | } | 168 | } |