Rename internal interfaces and update all signatures
このコミットが含まれているのは:
1 親
2dcde8748e
コミット
85fd44d863
20ファイル変更
+140
-183
検索条件に一致するファイルはありません
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
|
||||
namespace ComputeSharp.D2D1.Descriptors;
|
||||
|
||||
/// <summary>
|
||||
/// A type representing a data loader for the constant buffer of a D2D1 shader.
|
||||
/// </summary>
|
||||
public interface ID2D1ConstantBufferLoader
|
||||
{
|
||||
/// <summary>
|
||||
/// Loads the constant buffer of a D2D1 shader.
|
||||
/// </summary>
|
||||
/// <param name="data">The constant buffer for the D2D1 shader.</param>
|
||||
void LoadConstantBuffer(ReadOnlySpan<byte> data);
|
||||
}
|
||||
+38
-66
@@ -1,21 +1,22 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using ComputeSharp.D2D1.Interop;
|
||||
|
||||
namespace ComputeSharp.D2D1.__Internals;
|
||||
namespace ComputeSharp.D2D1.Descriptors;
|
||||
|
||||
/// <summary>
|
||||
/// A base <see langword="interface"/> representing a given shader that can be dispatched.
|
||||
/// An interface for a descriptor for a given D2D1 pixel shader.
|
||||
/// Descriptors contain metadata associated to D2D1 pixel shaders,
|
||||
/// with all information needed to run them and create effects.
|
||||
/// </summary>
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
[Obsolete("This interface is not intended to be used directly by user code")]
|
||||
public interface ID2D1Shader
|
||||
/// <typeparam name="T">The type of D2D1 pixel shader being described.</typeparam>
|
||||
public interface ID2D1PixelShaderDescriptor<T>
|
||||
where T : unmanaged, ID2D1PixelShader
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the effect id of the D2D effect using this shader.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This only applies to effects created from <see cref="Interop.D2D1PixelShaderEffect"/>.
|
||||
/// This only applies to effects created from <see cref="D2D1PixelShaderEffect"/>.
|
||||
/// </remarks>
|
||||
ref readonly Guid EffectId { get; }
|
||||
|
||||
@@ -23,7 +24,7 @@ public interface ID2D1Shader
|
||||
/// Gets the display name of the D2D effect using this shader, if specified.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This only applies to effects created from <see cref="Interop.D2D1PixelShaderEffect"/>.
|
||||
/// This only applies to effects created from <see cref="D2D1PixelShaderEffect"/>.
|
||||
/// </remarks>
|
||||
string? EffectDisplayName { get; }
|
||||
|
||||
@@ -31,7 +32,7 @@ public interface ID2D1Shader
|
||||
/// Gets the description of the D2D effect using this shader, if specified.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This only applies to effects created from <see cref="Interop.D2D1PixelShaderEffect"/>.
|
||||
/// This only applies to effects created from <see cref="D2D1PixelShaderEffect"/>.
|
||||
/// </remarks>
|
||||
string? EffectDescription { get; }
|
||||
|
||||
@@ -39,7 +40,7 @@ public interface ID2D1Shader
|
||||
/// Gets the category of the D2D effect using this shader, if specified.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This only applies to effects created from <see cref="Interop.D2D1PixelShaderEffect"/>.
|
||||
/// This only applies to effects created from <see cref="D2D1PixelShaderEffect"/>.
|
||||
/// </remarks>
|
||||
string? EffectCategory { get; }
|
||||
|
||||
@@ -47,107 +48,61 @@ public interface ID2D1Shader
|
||||
/// Gets the author of the D2D effect using this shader, if specified.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This only applies to effects created from <see cref="Interop.D2D1PixelShaderEffect"/>.
|
||||
/// This only applies to effects created from <see cref="D2D1PixelShaderEffect"/>.
|
||||
/// </remarks>
|
||||
string? EffectAuthor { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes the current shader from a buffer with the serialized dispatch data.
|
||||
/// </summary>
|
||||
/// <param name="data">The input buffer with the serialized dispatch data.</param>
|
||||
/// <remarks>The input buffer must be retrieved from <see cref="LoadDispatchData"/>.</remarks>
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
[Obsolete("This method is not intended to be called directly by user code")]
|
||||
void InitializeFromDispatchData(ReadOnlySpan<byte> data);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the pixel options for the current shader.
|
||||
/// </summary>
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
[Obsolete("This method is not intended to be used directly by user code")]
|
||||
D2D1PixelOptions PixelOptions { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the size in bytes of the constant buffer for the current shader.
|
||||
/// </summary>
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
[Obsolete("This method is not intended to be used directly by user code")]
|
||||
int ConstantBufferSize { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the number of inputs for the current shader.
|
||||
/// </summary>
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
[Obsolete("This method is not intended to be used directly by user code")]
|
||||
int InputCount { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the number of resource textures for the current shader.
|
||||
/// </summary>
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
[Obsolete("This method is not intended to be used directly by user code")]
|
||||
int ResourceTextureCount { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the input types for the current shader.
|
||||
/// </summary>
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
[Obsolete("This method is not intended to be used directly by user code")]
|
||||
ReadOnlyMemory<D2D1PixelShaderInputType> InputTypes { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the input descriptions for the current shader.
|
||||
/// </summary>
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
[Obsolete("This method is not intended to be used directly by user code")]
|
||||
ReadOnlyMemory<D2D1InputDescription> InputDescriptions { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the resource texture descriptions for the shader.
|
||||
/// </summary>
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
[Obsolete("This method is not intended to be used directly by user code")]
|
||||
ReadOnlyMemory<D2D1ResourceTextureDescription> ResourceTextureDescriptions { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the pixel options for the current shader.
|
||||
/// </summary>
|
||||
D2D1PixelOptions PixelOptions { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the buffer precision for the shader.
|
||||
/// </summary>
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
[Obsolete("This method is not intended to be used directly by user code")]
|
||||
D2D1BufferPrecision BufferPrecision { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the channel depth for the shader.
|
||||
/// </summary>
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
[Obsolete("This method is not intended to be used directly by user code")]
|
||||
D2D1ChannelDepth ChannelDepth { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Loads the dispatch data for the shader.
|
||||
/// </summary>
|
||||
/// <typeparam name="TLoader">The type of data loader being used.</typeparam>
|
||||
/// <param name="loader">The <typeparamref name="TLoader"/> instance to use to load the data.</param>
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
[Obsolete("This method is not intended to be called directly by user code")]
|
||||
void LoadDispatchData<TLoader>(ref TLoader loader)
|
||||
where TLoader : struct, ID2D1DispatchDataLoader;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the HLSL source code for the current shader instance.
|
||||
/// </summary>
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
[Obsolete("This method is not intended to be called directly by user code")]
|
||||
string HlslSource { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the shader profile for the current shader.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This shader profile is either explicitly set by users, or the default one for D2D1 shaders.
|
||||
/// </remarks>
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
[Obsolete("This method is not intended to be used directly by user code")]
|
||||
D2D1ShaderProfile ShaderProfile { get; }
|
||||
|
||||
/// <summary>
|
||||
@@ -156,17 +111,34 @@ public interface ID2D1Shader
|
||||
/// <remarks>
|
||||
/// This compile options are either explicitly set by users, or the default one for D2D1 shaders.
|
||||
/// </remarks>
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
[Obsolete("This method is not intended to be used directly by user code")]
|
||||
D2D1CompileOptions CompileOptions { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the HLSL source code for the current shader instance.
|
||||
/// </summary>
|
||||
string HlslSource { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the HLSL bytecode for the current shader, if available.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// If no precompiled HLSL bytecode is available, the returned <see cref="ReadOnlyMemory{T}"/> instance will be empty.
|
||||
/// </remarks>
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
[Obsolete("This method is not intended to be used directly by user code")]
|
||||
ReadOnlyMemory<byte> HlslBytecode { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new <typeparamref name="T"/> shader instance from a constant buffer.
|
||||
/// </summary>
|
||||
/// <param name="buffer">The input constant buffer to read.</param>
|
||||
/// <remarks>The input buffer must be retrieved from <see cref="LoadConstantBuffer"/>.</remarks>
|
||||
T CreateFromConstantBuffer(ReadOnlySpan<byte> buffer);
|
||||
|
||||
/// <summary>
|
||||
/// Loads the constant buffer of a given input shader.
|
||||
/// </summary>
|
||||
/// <typeparam name="TLoader">The type of data loader being used.</typeparam>
|
||||
/// <param name="shader">The input shader to load the constant buffer for.</param>
|
||||
/// <param name="loader">The <typeparamref name="TLoader"/> instance to use to load the constant buffer.</param>
|
||||
void LoadConstantBuffer<TLoader>(in T shader, ref TLoader loader)
|
||||
where TLoader : struct, ID2D1ConstantBufferLoader;
|
||||
}
|
||||
@@ -1,13 +1,9 @@
|
||||
using ComputeSharp.D2D1.__Internals;
|
||||
|
||||
#pragma warning disable CS0618
|
||||
|
||||
namespace ComputeSharp.D2D1;
|
||||
|
||||
/// <summary>
|
||||
/// An <see langword="interface"/> representing a D2D1 pixel shader.
|
||||
/// </summary>
|
||||
public interface ID2D1PixelShader : ID2D1Shader
|
||||
public interface ID2D1PixelShader
|
||||
{
|
||||
/// <summary>
|
||||
/// Executes the current pixel shader.
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace ComputeSharp.D2D1.__Internals;
|
||||
|
||||
/// <summary>
|
||||
/// A base <see langword="interface"/> representing a data loader for a D2D1 shader being dispatched.
|
||||
/// </summary>
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
[Obsolete("This interface is not intended to be used directly by user code")]
|
||||
public interface ID2D1DispatchDataLoader
|
||||
{
|
||||
/// <summary>
|
||||
/// Loads the captured values used by the D2D1 shader to be dispatched.
|
||||
/// </summary>
|
||||
/// <param name="data">The sequence of serialized captured values.</param>
|
||||
void LoadConstantBuffer(ReadOnlySpan<byte> data);
|
||||
}
|
||||
新しいイシューから参照
ユーザーをブロックする