We only want separate sampler types for bindless resources

This commit is contained in:
Gabriel A 2023-11-14 01:13:26 -03:00
parent 360630ad6b
commit 20a313ee15
2 changed files with 5 additions and 5 deletions

View file

@ -38,14 +38,14 @@ namespace Ryujinx.Graphics.Shader.StructuredIr
_storageBuffers[new(definition.Set, definition.Binding)] = definition; _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) public int AddLocalMemory(MemoryDefinition definition)

View file

@ -195,7 +195,7 @@ namespace Ryujinx.Graphics.Shader.Translation
private void AddBindlessDefinition(int set, int binding, string name, SamplerType samplerType) private void AddBindlessDefinition(int set, int binding, string name, SamplerType samplerType)
{ {
TextureDefinition definition = new(set, binding, name, samplerType, TextureFormat.Unknown, TextureUsageFlags.None, 0); 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) private void AddBindlessSeparateDefinition(int set, int binding, string name, SamplerType samplerType)