Add D2D1InteropServices.LoadShaderBytecode overload
このコミットが含まれているのは:
1 親
60b966cb74
コミット
5d1f3927d3
1ファイル変更
+19
@@ -15,6 +15,25 @@ namespace ComputeSharp.D2D1Interop.Interop;
|
||||
/// </summary>
|
||||
public static unsafe class D2D1InteropServices
|
||||
{
|
||||
/// <summary>
|
||||
/// Loads the bytecode from an input D2D1 pixel shader.
|
||||
/// <para>
|
||||
/// This overload can be used for simplicity when the D2D1 shader does not rely on captured objects to
|
||||
/// be processed correctly. This is the case when it does not contain any <see cref="Delegate"/>-s.
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type of D2D1 pixel shader to load the bytecode for.</typeparam>
|
||||
/// <param name="bytecode">A <see cref="ReadOnlyMemory{T}"/> instance with the resulting shader bytecode.</param>
|
||||
/// <remarks>
|
||||
/// If the input shader was precompiled, <paramref name="bytecode"/> will wrap a pinned memory buffer (from the PE section).
|
||||
/// If the shader was compiled at runtime, <paramref name="bytecode"/> will wrap a <see cref="byte"/> array with the bytecode.
|
||||
/// </remarks>
|
||||
public static void LoadShaderBytecode<T>(out ReadOnlyMemory<byte> bytecode)
|
||||
where T : unmanaged, ID2D1PixelShader
|
||||
{
|
||||
LoadShaderBytecode(default(T), out bytecode);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Loads the bytecode from an input D2D1 pixel shader.
|
||||
/// </summary>
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする