using System; using System.ComponentModel; using System.Diagnostics.CodeAnalysis; 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 { /// /// 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. /// /// The pixel options for the current shader. [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("This method is not intended to be used directly by user code")] uint GetPixelOptions(); /// /// Gets the number of inputs for the current shader. /// /// The number of inputs for the current shader. [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("This method is not intended to be used directly by user code")] uint GetInputCount(); /// /// Gets the input type for the input at the input index. /// /// The index of the shader input to get the type for. /// The type of input at the specified index. /// The return value if the input is out of range is undefined. [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("This method is not intended to be used directly by user code")] uint GetInputType(uint index); /// /// Loads the input descriptions for the shader, if any. /// /// The type of input descriptions loader being used. /// The instance to use to load the input descriptions. [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("This method is not intended to be used directly by user code")] void LoadInputDescriptions(ref TLoader loader) where TLoader : struct, ID2D1InputDescriptionsLoader; /// /// Loads the resource texture descriptions for the shader, if any. /// /// The type of resource texture descriptions loader being used. /// The instance to use to load the resource texture descriptions. [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("This method is not intended to be used directly by user code")] void LoadResourceTextureDescriptions(ref TLoader loader) where TLoader : struct, ID2D1ResourceTextureDescriptionsLoader; /// /// Gets the output buffer precision and depth for the shader. /// /// The output buffer precision. /// The output buffer channel depth. [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("This method is not intended to be used directly by user code")] void GetOutputBuffer(out uint precision, out uint depth); /// /// 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; /// /// Builds the HLSL source code for the current shader instance. /// /// The resulting HLSL source. [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("This method is not intended to be called directly by user code")] void BuildHlslSource(out string hlslSource); /// /// Loads the bytecode for the current shader. /// /// The type of bytecode loader being used. /// The instance to use to load the bytecode. /// The shader profile to use to get the shader bytecode (if , the precompiled shader will be used). /// The compile options to use to get the shader bytecode (if , the precompiled shader will be used). /// Thrown if a precompiled bytecode was requested ( is ), but it wasn't availablle. /// When this method returns, and will be set to the effective laues used to create the shader bytecode that was loaded. [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("This method is not intended to be used directly by user code")] void LoadBytecode(ref TLoader loader, [NotNull] ref D2D1ShaderProfile? shaderProfile, [NotNull] ref D2D1CompileOptions? compileOptions) where TLoader : struct, ID2D1BytecodeLoader; }