mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-08-07 02:38:29 +02:00
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
This commit is contained in:
@@ -8,7 +8,9 @@ namespace Ryujinx.Graphics.Shader.StructuredIr
|
||||
public TextureFormat Format { get; }
|
||||
public TextureFlags Flags { get; }
|
||||
|
||||
public int Set { get; }
|
||||
public int Binding { get; }
|
||||
public int SamplerSet { get; }
|
||||
public int SamplerBinding { get; }
|
||||
|
||||
public bool IsSeparate => SamplerBinding >= 0;
|
||||
@@ -18,7 +20,9 @@ namespace Ryujinx.Graphics.Shader.StructuredIr
|
||||
SamplerType type,
|
||||
TextureFormat format,
|
||||
TextureFlags flags,
|
||||
int set,
|
||||
int binding,
|
||||
int samplerSet,
|
||||
int samplerBinding,
|
||||
int index,
|
||||
params IAstNode[] sources) : base(inst, StorageKind.None, false, index, sources, sources.Length)
|
||||
@@ -26,8 +30,20 @@ namespace Ryujinx.Graphics.Shader.StructuredIr
|
||||
Type = type;
|
||||
Format = format;
|
||||
Flags = flags;
|
||||
Set = set;
|
||||
Binding = binding;
|
||||
SamplerSet = samplerSet;
|
||||
SamplerBinding = samplerBinding;
|
||||
}
|
||||
|
||||
public SetBindingPair GetTextureSetAndBinding()
|
||||
{
|
||||
return new SetBindingPair(Set, Binding);
|
||||
}
|
||||
|
||||
public SetBindingPair GetSamplerSetAndBinding()
|
||||
{
|
||||
return new SetBindingPair(SamplerSet, SamplerBinding);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user