/ src / Ryujinx.Graphics.Shader / StructuredIr / TextureDefinition.cs
TextureDefinition.cs
 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 bool Separate { get; }
 9          public string Name { get; }
10          public SamplerType Type { get; }
11          public TextureFormat Format { get; }
12          public TextureUsageFlags Flags { get; }
13  
14          public TextureDefinition(
15              int set,
16              int binding,
17              int arrayLength,
18              bool separate,
19              string name,
20              SamplerType type,
21              TextureFormat format,
22              TextureUsageFlags flags)
23          {
24              Set = set;
25              Binding = binding;
26              ArrayLength = arrayLength;
27              Separate = separate;
28              Name = name;
29              Type = type;
30              Format = format;
31              Flags = flags;
32          }
33  
34          public TextureDefinition(int set, int binding, string name, SamplerType type) : this(set, binding, 1, false, name, type, TextureFormat.Unknown, TextureUsageFlags.None)
35          {
36          }
37  
38          public TextureDefinition SetFlag(TextureUsageFlags flag)
39          {
40              return new TextureDefinition(Set, Binding, ArrayLength, Separate, Name, Type, Format, Flags | flag);
41          }
42      }
43  }