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
|
@ -2,9 +2,13 @@ namespace Ryujinx.Graphics.Shader.IntermediateRepresentation
|
|||
{
|
||||
class TextureOperation : Operation
|
||||
{
|
||||
private const int DefaultCbufSlot = -1;
|
||||
|
||||
public SamplerType Type { get; private set; }
|
||||
public TextureFlags Flags { get; private set; }
|
||||
|
||||
public int CbufSlot { get; private set; }
|
||||
|
||||
public int Handle { get; private set; }
|
||||
|
||||
public TextureFormat Format { get; set; }
|
||||
|
@ -18,9 +22,10 @@ namespace Ryujinx.Graphics.Shader.IntermediateRepresentation
|
|||
Operand dest,
|
||||
params Operand[] sources) : base(inst, compIndex, dest, sources)
|
||||
{
|
||||
Type = type;
|
||||
Flags = flags;
|
||||
Handle = handle;
|
||||
Type = type;
|
||||
Flags = flags;
|
||||
CbufSlot = DefaultCbufSlot;
|
||||
Handle = handle;
|
||||
}
|
||||
|
||||
public void TurnIntoIndexed(int handle)
|
||||
|
@ -30,7 +35,7 @@ namespace Ryujinx.Graphics.Shader.IntermediateRepresentation
|
|||
Handle = handle;
|
||||
}
|
||||
|
||||
public void SetHandle(int handle)
|
||||
public void SetHandle(int handle, int cbufSlot = DefaultCbufSlot)
|
||||
{
|
||||
if ((Flags & TextureFlags.Bindless) != 0)
|
||||
{
|
||||
|
@ -39,7 +44,8 @@ namespace Ryujinx.Graphics.Shader.IntermediateRepresentation
|
|||
RemoveSource(0);
|
||||
}
|
||||
|
||||
Handle = handle;
|
||||
CbufSlot = cbufSlot;
|
||||
Handle = handle;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue