TextureDefinition.cs 925 B

1234567891011121314151617181920212223242526272829
  1. namespace Ryujinx.Graphics.Shader
  2. {
  3. readonly struct TextureDefinition
  4. {
  5. public int Set { get; }
  6. public int Binding { get; }
  7. public int ArrayLength { get; }
  8. public string Name { get; }
  9. public SamplerType Type { get; }
  10. public TextureFormat Format { get; }
  11. public TextureUsageFlags Flags { get; }
  12. public TextureDefinition(int set, int binding, int arrayLength, string name, SamplerType type, TextureFormat format, TextureUsageFlags flags)
  13. {
  14. Set = set;
  15. Binding = binding;
  16. ArrayLength = arrayLength;
  17. Name = name;
  18. Type = type;
  19. Format = format;
  20. Flags = flags;
  21. }
  22. public TextureDefinition SetFlag(TextureUsageFlags flag)
  23. {
  24. return new TextureDefinition(Set, Binding, ArrayLength, Name, Type, Format, Flags | flag);
  25. }
  26. }
  27. }