BufferDescriptor.cs 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  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. public readonly int Set;
  7. public readonly int Binding;
  8. public readonly byte Slot;
  9. public readonly byte SbCbSlot;
  10. public readonly ushort SbCbOffset;
  11. public readonly BufferUsageFlags Flags;
  12. public BufferDescriptor(int set, int binding, int slot)
  13. {
  14. Set = set;
  15. Binding = binding;
  16. Slot = (byte)slot;
  17. SbCbSlot = 0;
  18. SbCbOffset = 0;
  19. Flags = BufferUsageFlags.None;
  20. }
  21. public BufferDescriptor(int set, int binding, int slot, int sbCbSlot, int sbCbOffset, BufferUsageFlags flags)
  22. {
  23. Set = set;
  24. Binding = binding;
  25. Slot = (byte)slot;
  26. SbCbSlot = (byte)sbCbSlot;
  27. SbCbOffset = (ushort)sbCbOffset;
  28. Flags = flags;
  29. }
  30. }
  31. }