BufferDescriptor.cs
1 namespace Ryujinx.Graphics.Shader 2 { 3 public readonly struct BufferDescriptor 4 { 5 // New fields should be added to the end of the struct to keep disk shader cache compatibility. 6 7 public readonly int Set; 8 public readonly int Binding; 9 public readonly byte Slot; 10 public readonly byte SbCbSlot; 11 public readonly ushort SbCbOffset; 12 public readonly BufferUsageFlags Flags; 13 14 public BufferDescriptor(int set, int binding, int slot) 15 { 16 Set = set; 17 Binding = binding; 18 Slot = (byte)slot; 19 SbCbSlot = 0; 20 SbCbOffset = 0; 21 Flags = BufferUsageFlags.None; 22 } 23 24 public BufferDescriptor(int set, int binding, int slot, int sbCbSlot, int sbCbOffset, BufferUsageFlags flags) 25 { 26 Set = set; 27 Binding = binding; 28 Slot = (byte)slot; 29 SbCbSlot = (byte)sbCbSlot; 30 SbCbOffset = (ushort)sbCbOffset; 31 Flags = flags; 32 } 33 } 34 }