using System; using System.ComponentModel; using ComputeSharp.D2D1.Interop; namespace ComputeSharp.D2D1.__Internals; /// /// A base representing a given shader that can be dispatched. /// [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("This interface is not intended to be used directly by user code")] public interface ID2D1Shader { /// /// Gets the effect id of the D2D effect using this shader. /// /// /// This only applies to effects created from . /// ref readonly Guid EffectId { get; } /// /// Gets the display name of the D2D effect using this shader, if specified. /// /// /// This only applies to effects created from . /// string? EffectDisplayName { get; } /// /// Gets the description of the D2D effect using this shader, if specified. /// /// /// This only applies to effects created from . /// string? EffectDescription { get; } /// /// Gets the category of the D2D effect using this shader, if specified. /// /// /// This only applies to effects created from . /// string? EffectCategory { get; } /// /// Gets the author of the D2D effect using this shader, if specified. /// /// /// This only applies to effects created from . /// string? EffectAuthor { get; } /// /// Initializes the current shader from a buffer with the serialized dispatch data. /// /// The input buffer with the serialized dispatch data. /// The input buffer must be retrieved from . [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("This method is not intended to be called directly by user code")] void InitializeFromDispatchData(ReadOnlySpan data); /// /// Gets the pixel options for the current shader. /// [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("This method is not intended to be used directly by user code")] D2D1PixelOptions PixelOptions { get; } /// /// Gets the number of inputs for the current shader. /// [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("This method is not intended to be used directly by user code")] int InputCount { get; } /// /// Gets the input types for the current shader. /// [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("This method is not intended to be used directly by user code")] ReadOnlyMemory InputTypes { get; } /// /// Gets the input descriptions for the current shader. /// [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("This method is not intended to be used directly by user code")] ReadOnlyMemory InputDescriptions { get; } /// /// Gets the resource texture descriptions for the shader. /// [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("This method is not intended to be used directly by user code")] ReadOnlyMemory ResourceTextureDescriptions { get; } /// /// Gets the buffer precision for the shader. /// [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("This method is not intended to be used directly by user code")] D2D1BufferPrecision BufferPrecision { get; } /// /// Gets the channel depth for the shader. /// [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("This method is not intended to be used directly by user code")] D2D1ChannelDepth ChannelDepth { get; } /// /// Loads the dispatch data for the shader. /// /// The type of data loader being used. /// The instance to use to load the data. [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("This method is not intended to be called directly by user code")] void LoadDispatchData(ref TLoader loader) where TLoader : struct, ID2D1DispatchDataLoader; /// /// Gets the HLSL source code for the current shader instance. /// [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("This method is not intended to be called directly by user code")] string HlslSource { get; } /// /// Gets the shader profile for the current shader. /// /// /// This shader profile is either explicitly set by users, or the default one for D2D1 shaders. /// [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("This method is not intended to be used directly by user code")] D2D1ShaderProfile ShaderProfile { get; } /// /// Gets the compile options for the current shader. /// /// /// This compile options are either explicitly set by users, or the default one for D2D1 shaders. /// [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("This method is not intended to be used directly by user code")] D2D1CompileOptions CompileOptions { get; } /// /// Gets the HLSL bytecode for the current shader, if available. /// /// /// If no precompiled HLSL bytecode is available, the returned instance will be empty. /// [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("This method is not intended to be used directly by user code")] ReadOnlyMemory HlslBytecode { get; } }