Enable pixel options info in D2D1PixelShaderEffect

このコミットが含まれているのは:
Sergio Pedri committed 2022-05-08 21:50:17 +02:00
1 親 b211932881
コミット a70ae6af38
3ファイル変更
+17 -1

検索条件に一致するファイルはありません

+8
ファイルの表示
@@ -64,6 +64,11 @@ internal unsafe partial struct PixelShaderEffect
/// </summary>
private static D2D1InputDescription* inputDescriptions;
/// <summary>
/// The pixel options for the shader.
/// </summary>
private static D2D1PixelOption pixelOptions;
/// <summary>
/// The shader bytecode.
/// </summary>
@@ -119,6 +124,7 @@ internal unsafe partial struct PixelShaderEffect
byte* bytecode = (byte*)RuntimeHelpers.AllocateTypeAssociatedMemory(typeof(For<T>), bytecodeSize);
D2D1BufferPrecision bufferPrecision = D2D1PixelShader.GetOutputBufferPrecision<T>();
D2D1ChannelDepth channelDepth = D2D1PixelShader.GetOutputBufferChannelDepth<T>();
D2D1PixelOption pixelOptions = D2D1PixelShader.GetPixelOptions<T>();
// Prepare the inputs info
int inputCount = D2D1PixelShader.GetInputCount<T>();
@@ -145,6 +151,7 @@ internal unsafe partial struct PixelShaderEffect
For<T>.inputTypes = inputTypes;
For<T>.inputDescriptionCount = inputDescriptionCount;
For<T>.inputDescriptions = inputDescriptions;
For<T>.pixelOptions = pixelOptions;
For<T>.bytecode = bytecode;
For<T>.bytecodeSize = bytecodeSize;
For<T>.bufferPrecision = bufferPrecision;
@@ -228,6 +235,7 @@ internal unsafe partial struct PixelShaderEffect
inputTypes,
inputDescriptionCount,
inputDescriptions,
pixelOptions,
bytecode,
bytecodeSize,
bufferPrecision,
@@ -324,7 +324,7 @@ partial struct PixelShaderEffect
@this->d2D1DrawInfo = drawInfo;
// Set the pixel shader for the effect
HRESULT hresult = drawInfo->SetPixelShader(&@this->shaderId);
HRESULT hresult = drawInfo->SetPixelShader(&@this->shaderId, (D2D1_PIXEL_OPTIONS)@this->pixelOptions);
if (hresult != S.S_OK)
{
+8
ファイルの表示
@@ -175,6 +175,11 @@ internal unsafe partial struct PixelShaderEffect
/// </remarks>
private D2D1InputDescription* inputDescriptions;
/// <summary>
/// The pixel options for the shader.
/// </summary>
private D2D1PixelOption pixelOptions;
/// <summary>
/// The shader bytecode.
/// </summary>
@@ -213,6 +218,7 @@ internal unsafe partial struct PixelShaderEffect
/// <param name="inputTypes">The buffer with the types of inputs for the shader.</param>
/// <param name="inputDescriptionCount">The number of available input descriptions.</param>
/// <param name="inputDescriptions">The buffer with the available input descriptions for the shader.</param>
/// <param name="pixelOptions">The pixel options for the shader.</param>
/// <param name="bytecode">The shader bytecode.</param>
/// <param name="bytecodeSize">The size of <paramref name="bytecode"/>.</param>
/// <param name="bufferPrecision">The buffer precision for the resulting output buffer.</param>
@@ -226,6 +232,7 @@ internal unsafe partial struct PixelShaderEffect
D2D1PixelShaderInputType* inputTypes,
int inputDescriptionCount,
D2D1InputDescription* inputDescriptions,
D2D1PixelOption pixelOptions,
byte* bytecode,
int bytecodeSize,
D2D1BufferPrecision bufferPrecision,
@@ -245,6 +252,7 @@ internal unsafe partial struct PixelShaderEffect
@this->inputTypes = inputTypes;
@this->inputDescriptionCount = inputDescriptionCount;
@this->inputDescriptions = inputDescriptions;
@this->pixelOptions = pixelOptions;
@this->bytecode = bytecode;
@this->bytecodeSize = bytecodeSize;
@this->bufferPrecision = bufferPrecision;