2023-07-03 14:29:27 -03:00
|
|
|
namespace Ryujinx.Graphics.Shader
|
|
|
|
|
{
|
|
|
|
|
readonly struct TextureDefinition
|
|
|
|
|
{
|
|
|
|
|
public int Set { get; }
|
|
|
|
|
public int Binding { get; }
|
2024-04-07 18:25:55 -03:00
|
|
|
public int ArrayLength { get; }
|
2023-07-03 14:29:27 -03:00
|
|
|
public string Name { get; }
|
|
|
|
|
public SamplerType Type { get; }
|
|
|
|
|
public TextureFormat Format { get; }
|
|
|
|
|
public TextureUsageFlags Flags { get; }
|
|
|
|
|
|
2024-04-07 18:25:55 -03:00
|
|
|
public TextureDefinition(int set, int binding, int arrayLength, string name, SamplerType type, TextureFormat format, TextureUsageFlags flags)
|
2023-07-03 14:29:27 -03:00
|
|
|
{
|
|
|
|
|
Set = set;
|
|
|
|
|
Binding = binding;
|
2024-04-07 18:25:55 -03:00
|
|
|
ArrayLength = arrayLength;
|
2023-07-03 14:29:27 -03:00
|
|
|
Name = name;
|
|
|
|
|
Type = type;
|
|
|
|
|
Format = format;
|
|
|
|
|
Flags = flags;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public TextureDefinition SetFlag(TextureUsageFlags flag)
|
|
|
|
|
{
|
2024-04-07 18:25:55 -03:00
|
|
|
return new TextureDefinition(Set, Binding, ArrayLength, Name, Type, Format, Flags | flag);
|
2023-07-03 14:29:27 -03:00
|
|
|
}
|
|
|
|
|
}
|
2023-07-24 18:35:04 +02:00
|
|
|
}
|