diff options
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Shader/ShaderCache.cs')
| -rw-r--r-- | Ryujinx.Graphics.Gpu/Shader/ShaderCache.cs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/Ryujinx.Graphics.Gpu/Shader/ShaderCache.cs b/Ryujinx.Graphics.Gpu/Shader/ShaderCache.cs index 8aa9b1c7..fc4bf778 100644 --- a/Ryujinx.Graphics.Gpu/Shader/ShaderCache.cs +++ b/Ryujinx.Graphics.Gpu/Shader/ShaderCache.cs @@ -235,15 +235,9 @@ namespace Ryujinx.Graphics.Gpu.Shader return false; } - for (int index = 0; index < shader.Code.Length; index++) - { - if (_context.MemoryAccessor.ReadInt32(gpuVa + (ulong)index * 4) != shader.Code[index]) - { - return true; - } - } + ReadOnlySpan<byte> memoryCode = _context.MemoryAccessor.GetSpan(gpuVa, (ulong)shader.Code.Length * 4); - return false; + return !MemoryMarshal.Cast<byte, int>(memoryCode).SequenceEqual(shader.Code); } /// <summary> |
