diff options
author | gdkchan <gab.dark.100@gmail.com> | 2022-12-05 16:11:32 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-05 19:11:32 +0000 |
commit | bbb24d8c7e6ccc61ceda1f4223fd68feee3b2f20 (patch) | |
tree | 955a54494cda71a9f816a08773886e5168980c59 /Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs | |
parent | 4da44e09cb2a32f69b4a6b47221117b78e4618dc (diff) |
Restrict shader storage buffer search when match fails (#4011)1.1.427
* Restrict storage buffer search when match fails
* Shader cache version bump
Diffstat (limited to 'Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs')
-rw-r--r-- | Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs b/Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs index 12cd4cd1..85b56b51 100644 --- a/Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs +++ b/Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs @@ -65,6 +65,8 @@ namespace Ryujinx.Graphics.Shader.Translation public UInt128 NextInputAttributesComponents { get; private set; } public UInt128 ThisInputAttributesComponents { get; private set; } + public int AccessibleStorageBuffersMask { get; private set; } + private int _usedConstantBuffers; private int _usedStorageBuffers; private int _usedStorageBuffersWrite; @@ -98,6 +100,8 @@ namespace Ryujinx.Graphics.Shader.Translation GpuAccessor = gpuAccessor; Options = options; + AccessibleStorageBuffersMask = (1 << GlobalMemory.StorageMaxCount) - 1; + UsedInputAttributesPerPatch = new HashSet<int>(); UsedOutputAttributesPerPatch = new HashSet<int>(); @@ -400,6 +404,11 @@ namespace Ryujinx.Graphics.Shader.Translation UsedFeatures |= flags; } + public void SetAccessibleStorageBuffersMask(int mask) + { + AccessibleStorageBuffersMask = mask; + } + public void SetUsedConstantBuffer(int slot) { _usedConstantBuffers |= 1 << slot; |