From cee712105850ac3385cd0091a923438167433f9f Mon Sep 17 00:00:00 2001 From: TSR Berry <20988865+TSRBerry@users.noreply.github.com> Date: Sat, 8 Apr 2023 01:22:00 +0200 Subject: Move solution and projects to src --- src/Ryujinx.Graphics.Shader/TextureDescriptor.cs | 34 ++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/Ryujinx.Graphics.Shader/TextureDescriptor.cs (limited to 'src/Ryujinx.Graphics.Shader/TextureDescriptor.cs') diff --git a/src/Ryujinx.Graphics.Shader/TextureDescriptor.cs b/src/Ryujinx.Graphics.Shader/TextureDescriptor.cs new file mode 100644 index 00000000..85ea9adb --- /dev/null +++ b/src/Ryujinx.Graphics.Shader/TextureDescriptor.cs @@ -0,0 +1,34 @@ +namespace Ryujinx.Graphics.Shader +{ + public struct TextureDescriptor + { + // New fields should be added to the end of the struct to keep disk shader cache compatibility. + + 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; + } + } +} \ No newline at end of file -- cgit v1.2.3