TextureDescriptor.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. namespace Ryujinx.Graphics.Shader
  2. {
  3. public struct TextureDescriptor
  4. {
  5. public string Name { get; }
  6. public SamplerType Type { get; }
  7. public TextureFormat Format { get; }
  8. public int HandleIndex { get; }
  9. public bool IsBindless { get; }
  10. public int CbufSlot { get; }
  11. public int CbufOffset { get; }
  12. public TextureUsageFlags Flags { get; set; }
  13. public TextureDescriptor(string name, SamplerType type, TextureFormat format, int handleIndex)
  14. {
  15. Name = name;
  16. Type = type;
  17. Format = format;
  18. HandleIndex = handleIndex;
  19. IsBindless = false;
  20. CbufSlot = 0;
  21. CbufOffset = 0;
  22. Flags = TextureUsageFlags.None;
  23. }
  24. public TextureDescriptor(string name, SamplerType type, int cbufSlot, int cbufOffset)
  25. {
  26. Name = name;
  27. Type = type;
  28. Format = TextureFormat.Unknown;
  29. HandleIndex = 0;
  30. IsBindless = true;
  31. CbufSlot = cbufSlot;
  32. CbufOffset = cbufOffset;
  33. Flags = TextureUsageFlags.None;
  34. }
  35. }
  36. }