mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2024-12-01 06:23:02 +00:00
9dfe81770a
* Change AggregateType to include vector type counts * Replace VariableType uses with AggregateType and delete VariableType * Support new local vector types on SPIR-V and GLSL * Start using vector outputs for texture operations * Use vectors on more texture operations * Use vector output for ImageLoad operations * Replace all uses of single destination texture constructors with multi destination ones * Update textureGatherOffsets replacement to split vector operations * Shader cache version bump Co-authored-by: Ac_K <Acoustik666@gmail.com>
69 lines
No EOL
1.9 KiB
C#
69 lines
No EOL
1.9 KiB
C#
namespace Ryujinx.Graphics.Shader.IntermediateRepresentation
|
|
{
|
|
class TextureOperation : Operation
|
|
{
|
|
public const int DefaultCbufSlot = -1;
|
|
|
|
public SamplerType Type { get; set; }
|
|
public TextureFormat Format { get; set; }
|
|
public TextureFlags Flags { get; private set; }
|
|
|
|
public int CbufSlot { get; private set; }
|
|
public int Handle { get; private set; }
|
|
|
|
public TextureOperation(
|
|
Instruction inst,
|
|
SamplerType type,
|
|
TextureFormat format,
|
|
TextureFlags flags,
|
|
int cbufSlot,
|
|
int handle,
|
|
int compIndex,
|
|
Operand[] dests,
|
|
Operand[] sources) : base(inst, compIndex, dests, sources)
|
|
{
|
|
Type = type;
|
|
Format = format;
|
|
Flags = flags;
|
|
CbufSlot = cbufSlot;
|
|
Handle = handle;
|
|
}
|
|
|
|
public TextureOperation(
|
|
Instruction inst,
|
|
SamplerType type,
|
|
TextureFormat format,
|
|
TextureFlags flags,
|
|
int handle,
|
|
int compIndex,
|
|
Operand[] dests,
|
|
Operand[] sources) : this(inst, type, format, flags, DefaultCbufSlot, handle, compIndex, dests, sources)
|
|
{
|
|
}
|
|
|
|
public void TurnIntoIndexed(int handle)
|
|
{
|
|
Type |= SamplerType.Indexed;
|
|
Flags &= ~TextureFlags.Bindless;
|
|
Handle = handle;
|
|
}
|
|
|
|
public void SetHandle(int handle, int cbufSlot = DefaultCbufSlot)
|
|
{
|
|
if ((Flags & TextureFlags.Bindless) != 0)
|
|
{
|
|
Flags &= ~TextureFlags.Bindless;
|
|
|
|
RemoveSource(0);
|
|
}
|
|
|
|
CbufSlot = cbufSlot;
|
|
Handle = handle;
|
|
}
|
|
|
|
public void SetLodLevelFlag()
|
|
{
|
|
Flags |= TextureFlags.LodLevel;
|
|
}
|
|
}
|
|
} |