BufferDescriptor.cs 939 B

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