Add D2D1PixelShader.GetInputDescriptions API
このコミットが含まれているのは:
1 親
3b760f02d4
コミット
7a5386a55e
8ファイル変更
+68
-13
検索条件に一致するファイルはありません
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using ComputeSharp.D2D1.__Internals;
|
||||
using TerraFX.Interop.DirectX;
|
||||
|
||||
#pragma warning disable CS0618
|
||||
|
||||
namespace ComputeSharp.D2D1.Shaders.Loaders;
|
||||
|
||||
/// <summary>
|
||||
/// A data loader for D2D1 pixel shaders dispatched via <see cref="ID2D1DrawInfo"/>.
|
||||
/// </summary>
|
||||
internal struct D2D1ByteArrayDispatchDataLoader : ID2D1DispatchDataLoader
|
||||
{
|
||||
/// <summary>
|
||||
/// The resulting array with the constant buffer to use.
|
||||
/// </summary>
|
||||
private byte[]? data;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the resulting pixel shader constant buffer.
|
||||
/// </summary>
|
||||
/// <remarks>A <see cref="byte"/> array with the constant buffer for the current shader.</remarks>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public byte[] GetResultingDispatchData()
|
||||
{
|
||||
return this.data!;
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
void ID2D1DispatchDataLoader.LoadConstantBuffer(ReadOnlySpan<uint> data)
|
||||
{
|
||||
this.data = MemoryMarshal.AsBytes(data).ToArray();
|
||||
}
|
||||
}
|
||||
新しいイシューから参照
ユーザーをブロックする