Reorder steps in the DX12 generator

このコミットが含まれているのは:
Sergio Pedri committed 2024-01-07 21:07:19 +01:00
1 親 f941d710b8
コミット 645c0f4e91
1ファイル変更
+8 -8
+8 -8
ファイルの表示
@@ -59,8 +59,6 @@ public sealed partial class ComputeShaderDescriptorGenerator : IIncrementalGener
return default;
}
using ImmutableArrayBuilder<DiagnosticInfo> diagnostics = new();
// Get the fields info
ConstantBuffer.GetInfo(
context.SemanticModel.Compilation,
@@ -81,6 +79,13 @@ public sealed partial class ComputeShaderDescriptorGenerator : IIncrementalGener
token.ThrowIfCancellationRequested();
// Get the compile options as well
CompileOptions compileOptions = HlslBytecode.GetCompileOptions(typeSymbol);
token.ThrowIfCancellationRequested();
using ImmutableArrayBuilder<DiagnosticInfo> diagnostics = new();
// Transpiled HLSL source info
HlslSource.GetInfo(
diagnostics,
@@ -96,7 +101,7 @@ public sealed partial class ComputeShaderDescriptorGenerator : IIncrementalGener
token.ThrowIfCancellationRequested();
// Get the resources info
// Get the resources info (we must do this after crawling the HLSL source)
Resources.GetInfo(
context.SemanticModel.Compilation,
typeSymbol,
@@ -106,11 +111,6 @@ public sealed partial class ComputeShaderDescriptorGenerator : IIncrementalGener
token.ThrowIfCancellationRequested();
// Get the compile options as well
CompileOptions compileOptions = HlslBytecode.GetCompileOptions(typeSymbol);
token.ThrowIfCancellationRequested();
// Prepare the lookup key for the HLSL shader bytecode
HlslBytecodeInfoKey hlslInfoKey = new(hlslSource, compileOptions, isCompilationEnabled);