aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgdk <gab.dark.100@gmail.com>2019-11-25 15:49:48 -0300
committerThog <thog@protonmail.com>2020-01-09 02:13:00 +0100
commit65428f5842311e2cacb49d2b9e24a3b803fe1f82 (patch)
treea2062f135180a1c4c4725e92aa2f200c0832d200
parentd0c7732fe21bc5c234ac611759e51926d2c8947e (diff)
Fix shader code comparison method
-rw-r--r--Ryujinx.Graphics.Gpu/Shader/ShaderCache.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Ryujinx.Graphics.Gpu/Shader/ShaderCache.cs b/Ryujinx.Graphics.Gpu/Shader/ShaderCache.cs
index dd40bb72..a781de42 100644
--- a/Ryujinx.Graphics.Gpu/Shader/ShaderCache.cs
+++ b/Ryujinx.Graphics.Gpu/Shader/ShaderCache.cs
@@ -172,9 +172,9 @@ namespace Ryujinx.Graphics.Gpu.Shader
private bool IsShaderDifferent(CachedShader shader, ulong gpuVa)
{
- for (int offset = 0; offset < shader.Code.Length; offset += 4)
+ for (int index = 0; index < shader.Code.Length; index++)
{
- if (_context.MemoryAccessor.ReadInt32(gpuVa + (ulong)offset) != shader.Code[offset / 4])
+ if (_context.MemoryAccessor.ReadInt32(gpuVa + (ulong)index * 4) != shader.Code[index])
{
return true;
}