mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-03-25 22:30:18 +00:00
* Add support for large sampler arrays on Vulkan * Shader cache version bump * Format whitespace * Move DescriptorSetManager to PipelineLayoutCacheEntry to allow different pool sizes per layout * Handle array textures with different types on the same buffer * Somewhat better caching system * Avoid useless buffer data modification checks * Move redundant bindings update checking to the backend * Fix an issue where texture arrays would get the same bindings across stages on Vulkan * Backport some fixes from part 2 * Fix typo * PR feedback * Format whitespace * Add some missing XML docs
52 lines
1.3 KiB
C#
52 lines
1.3 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 Binding { get; private set; }
|
|
|
|
public TextureOperation(
|
|
Instruction inst,
|
|
SamplerType type,
|
|
TextureFormat format,
|
|
TextureFlags flags,
|
|
int binding,
|
|
int compIndex,
|
|
Operand[] dests,
|
|
Operand[] sources) : base(inst, compIndex, dests, sources)
|
|
{
|
|
Type = type;
|
|
Format = format;
|
|
Flags = flags;
|
|
Binding = binding;
|
|
}
|
|
|
|
public void TurnIntoArray(int binding)
|
|
{
|
|
Flags &= ~TextureFlags.Bindless;
|
|
Binding = binding;
|
|
}
|
|
|
|
public void SetBinding(int binding)
|
|
{
|
|
if ((Flags & TextureFlags.Bindless) != 0)
|
|
{
|
|
Flags &= ~TextureFlags.Bindless;
|
|
|
|
RemoveSource(0);
|
|
}
|
|
|
|
Binding = binding;
|
|
}
|
|
|
|
public void SetLodLevelFlag()
|
|
{
|
|
Flags |= TextureFlags.LodLevel;
|
|
}
|
|
}
|
|
}
|