From dde9bb5c69d2e1a70df82af8accd3d01fb94b78d Mon Sep 17 00:00:00 2001 From: gdkchan Date: Tue, 6 Dec 2022 00:36:54 -0300 Subject: [PATCH] Fix storage buffer access when match fails (#4037) * Fix storage buffer access when match fails * Shader cache version bump --- Ryujinx.Graphics.Gpu/Shader/DiskCache/DiskCacheHostStorage.cs | 2 +- Ryujinx.Graphics.Shader/Translation/Rewriter.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Ryujinx.Graphics.Gpu/Shader/DiskCache/DiskCacheHostStorage.cs b/Ryujinx.Graphics.Gpu/Shader/DiskCache/DiskCacheHostStorage.cs index 4f2fca107a..2bdb85bf03 100644 --- a/Ryujinx.Graphics.Gpu/Shader/DiskCache/DiskCacheHostStorage.cs +++ b/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 FileFormatVersionMinor = 2; 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 SharedDataFileName = "shared.data"; diff --git a/Ryujinx.Graphics.Shader/Translation/Rewriter.cs b/Ryujinx.Graphics.Shader/Translation/Rewriter.cs index 9029e4de18..c4d2c5d90b 100644 --- a/Ryujinx.Graphics.Shader/Translation/Rewriter.cs +++ b/Ryujinx.Graphics.Shader/Translation/Rewriter.cs @@ -126,7 +126,7 @@ namespace Ryujinx.Graphics.Shader.Translation sbSlot = PrependOperation(Instruction.ConditionalSelect, inRange, Const(slot), sbSlot); } - if (sbUseMask != 0) + if (config.AccessibleStorageBuffersMask != 0) { Operand alignMask = Const(-config.GpuAccessor.QueryHostStorageBufferOffsetAlignment());