Reorder steps in D2DPixelShaderDescriptorGenerator

このコミットが含まれているのは:
Sergio Pedri committed 2024-01-04 12:14:55 +00:00
1 親 cbcde03263
コミット 20b92d8810
1ファイル変更
+14 -14
+14 -14
ファイルの表示
@@ -84,8 +84,6 @@ public sealed partial class D2DPixelShaderDescriptorGenerator : IIncrementalGene
token.ThrowIfCancellationRequested();
using ImmutableArrayBuilder<DiagnosticInfo> diagnostics = new();
// Constant buffer info
ConstantBuffer.GetInfo(
context.SemanticModel.Compilation,
@@ -112,18 +110,6 @@ public sealed partial class D2DPixelShaderDescriptorGenerator : IIncrementalGene
token.ThrowIfCancellationRequested();
// Get HLSL source for HlslSource
string hlslSource = HlslSource.GetHlslSource(
diagnostics,
context.SemanticModel.Compilation,
typeSymbol,
inputCount,
inputSimpleIndices,
inputComplexIndices,
token);
token.ThrowIfCancellationRequested();
// Get the info for the output buffer properties
OutputBuffer.GetInfo(typeSymbol, out D2D1BufferPrecision bufferPrecision, out D2D1ChannelDepth channelDepth);
@@ -150,6 +136,20 @@ public sealed partial class D2DPixelShaderDescriptorGenerator : IIncrementalGene
token.ThrowIfCancellationRequested();
using ImmutableArrayBuilder<DiagnosticInfo> diagnostics = new();
// Get HLSL source for HlslSource
string hlslSource = HlslSource.GetHlslSource(
diagnostics,
context.SemanticModel.Compilation,
typeSymbol,
inputCount,
inputSimpleIndices,
inputComplexIndices,
token);
token.ThrowIfCancellationRequested();
// As the last steps in the pipeline, try to compile the shader if needed.
// This is done last so that it can be skipped if any errors happened before.
HlslBytecodeInfoKey hlslInfoKey = new(