mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-25 21:27:14 +02:00
Add support for bindless textures from shader input (vertex buffer) on Vulkan (#6577)
* Add support for bindless textures from shader input (vertex buffer) * Shader cache version bump * Format whitespace * Remove cache entries on pool removal, disable for OpenGL * PR feedback
This commit is contained in:
parent
9b94662b4b
commit
c6f8bfed90
39 changed files with 1091 additions and 311 deletions
|
@ -9,6 +9,9 @@ namespace Ryujinx.Graphics.Shader.StructuredIr
|
|||
public TextureFlags Flags { get; }
|
||||
|
||||
public int Binding { get; }
|
||||
public int SamplerBinding { get; }
|
||||
|
||||
public bool IsSeparate => SamplerBinding >= 0;
|
||||
|
||||
public AstTextureOperation(
|
||||
Instruction inst,
|
||||
|
@ -16,6 +19,7 @@ namespace Ryujinx.Graphics.Shader.StructuredIr
|
|||
TextureFormat format,
|
||||
TextureFlags flags,
|
||||
int binding,
|
||||
int samplerBinding,
|
||||
int index,
|
||||
params IAstNode[] sources) : base(inst, StorageKind.None, false, index, sources, sources.Length)
|
||||
{
|
||||
|
@ -23,6 +27,7 @@ namespace Ryujinx.Graphics.Shader.StructuredIr
|
|||
Format = format;
|
||||
Flags = flags;
|
||||
Binding = binding;
|
||||
SamplerBinding = samplerBinding;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -169,7 +169,7 @@ namespace Ryujinx.Graphics.Shader.StructuredIr
|
|||
|
||||
AstTextureOperation GetAstTextureOperation(TextureOperation texOp)
|
||||
{
|
||||
return new AstTextureOperation(inst, texOp.Type, texOp.Format, texOp.Flags, texOp.Binding, texOp.Index, sources);
|
||||
return new AstTextureOperation(inst, texOp.Type, texOp.Format, texOp.Flags, texOp.Binding, texOp.SamplerBinding, texOp.Index, sources);
|
||||
}
|
||||
|
||||
int componentsCount = BitOperations.PopCount((uint)operation.Index);
|
||||
|
|
|
@ -5,25 +5,39 @@ namespace Ryujinx.Graphics.Shader
|
|||
public int Set { get; }
|
||||
public int Binding { get; }
|
||||
public int ArrayLength { get; }
|
||||
public bool Separate { get; }
|
||||
public string Name { get; }
|
||||
public SamplerType Type { get; }
|
||||
public TextureFormat Format { get; }
|
||||
public TextureUsageFlags Flags { get; }
|
||||
|
||||
public TextureDefinition(int set, int binding, int arrayLength, string name, SamplerType type, TextureFormat format, TextureUsageFlags flags)
|
||||
public TextureDefinition(
|
||||
int set,
|
||||
int binding,
|
||||
int arrayLength,
|
||||
bool separate,
|
||||
string name,
|
||||
SamplerType type,
|
||||
TextureFormat format,
|
||||
TextureUsageFlags flags)
|
||||
{
|
||||
Set = set;
|
||||
Binding = binding;
|
||||
ArrayLength = arrayLength;
|
||||
Separate = separate;
|
||||
Name = name;
|
||||
Type = type;
|
||||
Format = format;
|
||||
Flags = flags;
|
||||
}
|
||||
|
||||
public TextureDefinition(int set, int binding, string name, SamplerType type) : this(set, binding, 1, false, name, type, TextureFormat.Unknown, TextureUsageFlags.None)
|
||||
{
|
||||
}
|
||||
|
||||
public TextureDefinition SetFlag(TextureUsageFlags flag)
|
||||
{
|
||||
return new TextureDefinition(Set, Binding, ArrayLength, Name, Type, Format, Flags | flag);
|
||||
return new TextureDefinition(Set, Binding, ArrayLength, Separate, Name, Type, Format, Flags | flag);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue