Simplify logic for bindless texture handling (#1667)
* Simplify logic for bindless texture handling * Nits
This commit is contained in:
parent
eda6b78894
commit
934a78005e
16 changed files with 131 additions and 191 deletions
|
@ -5,46 +5,21 @@ namespace Ryujinx.Graphics.Shader
|
|||
public int Binding { get; }
|
||||
|
||||
public SamplerType Type { get; }
|
||||
|
||||
public TextureFormat Format { get; }
|
||||
|
||||
public int CbufSlot { get; }
|
||||
public int HandleIndex { get; }
|
||||
|
||||
public bool IsBindless { get; }
|
||||
|
||||
public int CbufSlot { get; }
|
||||
public int CbufOffset { get; }
|
||||
|
||||
public TextureUsageFlags Flags { get; set; }
|
||||
|
||||
public TextureDescriptor(int binding, SamplerType type, TextureFormat format, int handleIndex)
|
||||
public TextureDescriptor(int binding, SamplerType type, TextureFormat format, int cbufSlot, int handleIndex)
|
||||
{
|
||||
Binding = binding;
|
||||
Type = type;
|
||||
Format = format;
|
||||
CbufSlot = cbufSlot;
|
||||
HandleIndex = handleIndex;
|
||||
|
||||
IsBindless = false;
|
||||
|
||||
CbufSlot = 0;
|
||||
CbufOffset = 0;
|
||||
|
||||
Flags = TextureUsageFlags.None;
|
||||
}
|
||||
|
||||
public TextureDescriptor(int binding, SamplerType type, int cbufSlot, int cbufOffset)
|
||||
{
|
||||
Binding = binding;
|
||||
Type = type;
|
||||
Format = TextureFormat.Unknown;
|
||||
HandleIndex = 0;
|
||||
|
||||
IsBindless = true;
|
||||
|
||||
CbufSlot = cbufSlot;
|
||||
CbufOffset = cbufOffset;
|
||||
|
||||
Flags = TextureUsageFlags.None;
|
||||
Flags = TextureUsageFlags.None;
|
||||
}
|
||||
|
||||
public TextureDescriptor SetFlag(TextureUsageFlags flag)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue