From 20a313ee15ee8632b7527170bc77d94b214e18cf Mon Sep 17 00:00:00 2001 From: Gabriel A Date: Tue, 14 Nov 2023 01:13:26 -0300 Subject: [PATCH] We only want separate sampler types for bindless resources --- .../StructuredIr/ShaderProperties.cs | 8 ++++---- .../Translation/ResourceManager.cs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Ryujinx.Graphics.Shader/StructuredIr/ShaderProperties.cs b/src/Ryujinx.Graphics.Shader/StructuredIr/ShaderProperties.cs index 05b6faee8..4e6f3a0a6 100644 --- a/src/Ryujinx.Graphics.Shader/StructuredIr/ShaderProperties.cs +++ b/src/Ryujinx.Graphics.Shader/StructuredIr/ShaderProperties.cs @@ -38,14 +38,14 @@ namespace Ryujinx.Graphics.Shader.StructuredIr _storageBuffers[new(definition.Set, definition.Binding)] = definition; } - public void AddOrUpdateTexture(TextureDefinition definition) + public void AddOrUpdateTexture(TextureDefinition definition, SamplerType type = SamplerType.None) { - _textures[new(definition.Set, definition.Binding, definition.Type & ~(SamplerType.Shadow | SamplerType.Separate))] = definition; + _textures[new(definition.Set, definition.Binding, type)] = definition; } - public void AddOrUpdateImage(TextureDefinition definition) + public void AddOrUpdateImage(TextureDefinition definition, SamplerType type = SamplerType.None) { - _images[new(definition.Set, definition.Binding, definition.Type & ~(SamplerType.Shadow | SamplerType.Separate))] = definition; + _images[new(definition.Set, definition.Binding, type)] = definition; } public int AddLocalMemory(MemoryDefinition definition) diff --git a/src/Ryujinx.Graphics.Shader/Translation/ResourceManager.cs b/src/Ryujinx.Graphics.Shader/Translation/ResourceManager.cs index a4a8be937..6abe1532a 100644 --- a/src/Ryujinx.Graphics.Shader/Translation/ResourceManager.cs +++ b/src/Ryujinx.Graphics.Shader/Translation/ResourceManager.cs @@ -195,7 +195,7 @@ namespace Ryujinx.Graphics.Shader.Translation private void AddBindlessDefinition(int set, int binding, string name, SamplerType samplerType) { TextureDefinition definition = new(set, binding, name, samplerType, TextureFormat.Unknown, TextureUsageFlags.None, 0); - Properties.AddOrUpdateTexture(definition); + Properties.AddOrUpdateTexture(definition, samplerType & ~(SamplerType.Separate | SamplerType.Shadow)); } private void AddBindlessSeparateDefinition(int set, int binding, string name, SamplerType samplerType)