mirror of
https://github.com/GreemDev/Ryujinx
synced 2024-11-22 09:53:35 +01:00
48f6570557
Here come Salieri, my implementation of a disk shader cache! "I'm sure you know why I named it that." "It doesn't really mean anything." This implementation collects shaders at runtime and cache them to be later compiled when starting a game.
32 lines
No EOL
835 B
C#
32 lines
No EOL
835 B
C#
namespace Ryujinx.Graphics.Shader
|
|
{
|
|
public struct TextureDescriptor
|
|
{
|
|
public readonly int Binding;
|
|
|
|
public readonly SamplerType Type;
|
|
public readonly TextureFormat Format;
|
|
|
|
public readonly int CbufSlot;
|
|
public readonly int HandleIndex;
|
|
|
|
public TextureUsageFlags Flags;
|
|
|
|
public TextureDescriptor(int binding, SamplerType type, TextureFormat format, int cbufSlot, int handleIndex)
|
|
{
|
|
Binding = binding;
|
|
Type = type;
|
|
Format = format;
|
|
CbufSlot = cbufSlot;
|
|
HandleIndex = handleIndex;
|
|
Flags = TextureUsageFlags.None;
|
|
}
|
|
|
|
public TextureDescriptor SetFlag(TextureUsageFlags flag)
|
|
{
|
|
Flags |= flag;
|
|
|
|
return this;
|
|
}
|
|
}
|
|
} |