Explorar el Código

Fix shader code comparison method

gdk hace 6 años
padre
commit
65428f5842
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      Ryujinx.Graphics.Gpu/Shader/ShaderCache.cs

+ 2 - 2
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;
                 }