TextureDescriptor.cs 843 B

1234567891011121314151617181920212223242526272829303132
  1. namespace Ryujinx.Graphics.Shader
  2. {
  3. public struct TextureDescriptor
  4. {
  5. public int Binding { get; }
  6. public SamplerType Type { get; }
  7. public TextureFormat Format { get; }
  8. public int CbufSlot { get; }
  9. public int HandleIndex { get; }
  10. public TextureUsageFlags Flags { get; set; }
  11. public TextureDescriptor(int binding, SamplerType type, TextureFormat format, int cbufSlot, int handleIndex)
  12. {
  13. Binding = binding;
  14. Type = type;
  15. Format = format;
  16. CbufSlot = cbufSlot;
  17. HandleIndex = handleIndex;
  18. Flags = TextureUsageFlags.None;
  19. }
  20. public TextureDescriptor SetFlag(TextureUsageFlags flag)
  21. {
  22. Flags |= flag;
  23. return this;
  24. }
  25. }
  26. }