aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Graphics.Shader/BufferDescriptor.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Ryujinx.Graphics.Shader/BufferDescriptor.cs')
-rw-r--r--src/Ryujinx.Graphics.Shader/BufferDescriptor.cs26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/Ryujinx.Graphics.Shader/BufferDescriptor.cs b/src/Ryujinx.Graphics.Shader/BufferDescriptor.cs
new file mode 100644
index 00000000..4ce8a896
--- /dev/null
+++ b/src/Ryujinx.Graphics.Shader/BufferDescriptor.cs
@@ -0,0 +1,26 @@
+namespace Ryujinx.Graphics.Shader
+{
+ public struct BufferDescriptor
+ {
+ // New fields should be added to the end of the struct to keep disk shader cache compatibility.
+
+ public readonly int Binding;
+ public readonly int Slot;
+ public BufferUsageFlags Flags;
+
+ public BufferDescriptor(int binding, int slot)
+ {
+ Binding = binding;
+ Slot = slot;
+
+ Flags = BufferUsageFlags.None;
+ }
+
+ public BufferDescriptor SetFlag(BufferUsageFlags flag)
+ {
+ Flags |= flag;
+
+ return this;
+ }
+ }
+} \ No newline at end of file