aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Graphics.Shader/StructuredIr/ShaderProperties.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2024-05-26 13:30:19 -0300
committerGitHub <noreply@github.com>2024-05-26 13:30:19 -0300
commit53d096e392d85106a41d8edad1dcda5cce7446a2 (patch)
tree38fcf4a50e666c96c5c0ea133201f0b390bd14eb /src/Ryujinx.Graphics.Shader/StructuredIr/ShaderProperties.cs
parent4cc00bb4b1b777734151cab5570d622fbfefa49f (diff)
Allow texture arrays to use separate descriptor sets on Vulkan (#6870)
* Report base and extra sets from the backend * Pass texture set index everywhere * Key textures using set and binding (rather than just binding) * Start using extra sets for array textures * Shader cache version bump * Separate new commands, some PR feedback * Introduce new manual descriptor set reservation method that prevents it from being used by something else while owned by an array * Move bind extra sets logic to new method * Should only use separate array is MaximumExtraSets is not zero * Format whitespace
Diffstat (limited to 'src/Ryujinx.Graphics.Shader/StructuredIr/ShaderProperties.cs')
-rw-r--r--src/Ryujinx.Graphics.Shader/StructuredIr/ShaderProperties.cs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/Ryujinx.Graphics.Shader/StructuredIr/ShaderProperties.cs b/src/Ryujinx.Graphics.Shader/StructuredIr/ShaderProperties.cs
index 8c12c2aa..53ed6bfc 100644
--- a/src/Ryujinx.Graphics.Shader/StructuredIr/ShaderProperties.cs
+++ b/src/Ryujinx.Graphics.Shader/StructuredIr/ShaderProperties.cs
@@ -6,15 +6,15 @@ namespace Ryujinx.Graphics.Shader.StructuredIr
{
private readonly Dictionary<int, BufferDefinition> _constantBuffers;
private readonly Dictionary<int, BufferDefinition> _storageBuffers;
- private readonly Dictionary<int, TextureDefinition> _textures;
- private readonly Dictionary<int, TextureDefinition> _images;
+ private readonly Dictionary<SetBindingPair, TextureDefinition> _textures;
+ private readonly Dictionary<SetBindingPair, TextureDefinition> _images;
private readonly Dictionary<int, MemoryDefinition> _localMemories;
private readonly Dictionary<int, MemoryDefinition> _sharedMemories;
public IReadOnlyDictionary<int, BufferDefinition> ConstantBuffers => _constantBuffers;
public IReadOnlyDictionary<int, BufferDefinition> StorageBuffers => _storageBuffers;
- public IReadOnlyDictionary<int, TextureDefinition> Textures => _textures;
- public IReadOnlyDictionary<int, TextureDefinition> Images => _images;
+ public IReadOnlyDictionary<SetBindingPair, TextureDefinition> Textures => _textures;
+ public IReadOnlyDictionary<SetBindingPair, TextureDefinition> Images => _images;
public IReadOnlyDictionary<int, MemoryDefinition> LocalMemories => _localMemories;
public IReadOnlyDictionary<int, MemoryDefinition> SharedMemories => _sharedMemories;
@@ -22,8 +22,8 @@ namespace Ryujinx.Graphics.Shader.StructuredIr
{
_constantBuffers = new Dictionary<int, BufferDefinition>();
_storageBuffers = new Dictionary<int, BufferDefinition>();
- _textures = new Dictionary<int, TextureDefinition>();
- _images = new Dictionary<int, TextureDefinition>();
+ _textures = new Dictionary<SetBindingPair, TextureDefinition>();
+ _images = new Dictionary<SetBindingPair, TextureDefinition>();
_localMemories = new Dictionary<int, MemoryDefinition>();
_sharedMemories = new Dictionary<int, MemoryDefinition>();
}
@@ -40,12 +40,12 @@ namespace Ryujinx.Graphics.Shader.StructuredIr
public void AddOrUpdateTexture(TextureDefinition definition)
{
- _textures[definition.Binding] = definition;
+ _textures[new(definition.Set, definition.Binding)] = definition;
}
public void AddOrUpdateImage(TextureDefinition definition)
{
- _images[definition.Binding] = definition;
+ _images[new(definition.Set, definition.Binding)] = definition;
}
public int AddLocalMemory(MemoryDefinition definition)