using Ryujinx.Graphics.GAL; using Ryujinx.Graphics.Shader; namespace Ryujinx.Graphics.Gpu.Image { /// /// Texture binding information. /// This is used for textures that needs to be accessed from shaders. /// readonly struct TextureBindingInfo { /// /// Shader sampler target type. /// public Target Target { get; } /// /// For images, indicates the format specified on the shader. /// public Format Format { get; } /// /// Shader texture host binding point. /// public int Binding { get; } /// /// Constant buffer slot with the texture handle. /// public int CbufSlot { get; } /// /// Index of the texture handle on the constant buffer at slot . /// public int Handle { get; } /// /// Flags from the texture descriptor that indicate how the texture is used. /// public TextureUsageFlags Flags { get; } /// /// Constructs the texture binding information structure. /// /// The shader sampler target type /// Format of the image as declared on the shader /// The shader texture binding point /// Constant buffer slot where the texture handle is located /// The shader texture handle (read index into the texture constant buffer) /// The texture's usage flags, indicating how it is used in the shader public TextureBindingInfo(Target target, Format format, int binding, int cbufSlot, int handle, TextureUsageFlags flags) { Target = target; Format = format; Binding = binding; CbufSlot = cbufSlot; Handle = handle; Flags = flags; } /// /// Constructs the texture binding information structure. /// /// The shader sampler target type /// The shader texture binding point /// Constant buffer slot where the texture handle is located /// The shader texture handle (read index into the texture constant buffer) /// The texture's usage flags, indicating how it is used in the shader public TextureBindingInfo(Target target, int binding, int cbufSlot, int handle, TextureUsageFlags flags) : this(target, (Format)0, binding, cbufSlot, handle, flags) { } } }