Răsfoiți Sursa

Fix storage buffer access when match fails (#4037)

* Fix storage buffer access when match fails

* Shader cache version bump
gdkchan 3 ani în urmă
părinte
comite
dde9bb5c69

+ 1 - 1
Ryujinx.Graphics.Gpu/Shader/DiskCache/DiskCacheHostStorage.cs

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

+ 1 - 1
Ryujinx.Graphics.Shader/Translation/Rewriter.cs

@@ -126,7 +126,7 @@ namespace Ryujinx.Graphics.Shader.Translation
                 sbSlot        = PrependOperation(Instruction.ConditionalSelect, inRange, Const(slot), sbSlot);
                 sbSlot        = PrependOperation(Instruction.ConditionalSelect, inRange, Const(slot), sbSlot);
             }
             }
 
 
-            if (sbUseMask != 0)
+            if (config.AccessibleStorageBuffersMask != 0)
             {
             {
                 Operand alignMask = Const(-config.GpuAccessor.QueryHostStorageBufferOffsetAlignment());
                 Operand alignMask = Const(-config.GpuAccessor.QueryHostStorageBufferOffsetAlignment());