Check for cancellation during HLSL rewriting
このコミットが含まれているのは:
1 親
38ce32e99a
コミット
c0f83657b3
6ファイル変更
+71
-16
検索条件に一致するファイルはありません
@@ -298,13 +298,20 @@ partial class ComputeShaderDescriptorGenerator
|
||||
false => $"static {HlslKnownTypes.GetMappedName(typeSymbol)}"
|
||||
};
|
||||
|
||||
token.ThrowIfCancellationRequested();
|
||||
|
||||
StaticFieldRewriter staticFieldRewriter = new(
|
||||
semanticModel,
|
||||
discoveredTypes,
|
||||
constantDefinitions,
|
||||
diagnostics);
|
||||
diagnostics,
|
||||
token);
|
||||
|
||||
string? assignment = staticFieldRewriter.Visit(variableDeclarator)?.NormalizeWhitespace(eol: "\n").ToFullString();
|
||||
ExpressionSyntax? processedDeclaration = staticFieldRewriter.Visit(variableDeclarator);
|
||||
|
||||
token.ThrowIfCancellationRequested();
|
||||
|
||||
string? assignment = processedDeclaration?.NormalizeWhitespace(eol: "\n").ToFullString();
|
||||
|
||||
builder.Add((mapping ?? fieldSymbol.Name, typeDeclaration, assignment));
|
||||
}
|
||||
@@ -427,6 +434,7 @@ partial class ComputeShaderDescriptorGenerator
|
||||
constructors,
|
||||
constantDefinitions,
|
||||
diagnostics,
|
||||
token,
|
||||
isShaderEntryPoint);
|
||||
|
||||
// Rewrite the method syntax tree
|
||||
|
||||
+1
-1
@@ -239,7 +239,7 @@ public sealed class InvalidComputeContextCopyAnalyzer : DiagnosticAnalyzer
|
||||
return;
|
||||
}
|
||||
|
||||
context.ReportDiagnostic(Diagnostic.Create(InvalidComputeContextCopy, symbol.DeclaringSyntaxReferences[0].GetSyntax().GetLocation()));
|
||||
context.ReportDiagnostic(Diagnostic.Create(InvalidComputeContextCopy, symbol.DeclaringSyntaxReferences[0].GetSyntax(context.CancellationToken).GetLocation()));
|
||||
}
|
||||
}, SymbolKind.Field);
|
||||
});
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする