Move MultipleShaderTypesImplemented to analyzer

このコミットが含まれているのは:
Sergio Pedri committed 2023-11-29 23:17:33 +01:00
1 親 7a630204ef
コミット 86bc68e4dd
4ファイル変更
+24 -26

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

-6
ファイルの表示
@@ -58,12 +58,6 @@ partial class ComputeShaderDescriptorGenerator
Dictionary<IMethodSymbol, MethodDeclarationSyntax> instanceMethods = new(SymbolEqualityComparer.Default);
Dictionary<IFieldSymbol, string> constantDefinitions = new(SymbolEqualityComparer.Default);
// A given type can only represent a single shader type
if (structDeclarationSymbol.AllInterfaces.Count(static interfaceSymbol => interfaceSymbol is { Name: nameof(IComputeShader) } or { IsGenericType: true, Name: nameof(IComputeShader<byte>) }) > 1)
{
diagnostics.Add(MultipleShaderTypesImplemented, structDeclarationSymbol, structDeclarationSymbol);
}
// Explore the syntax tree and extract the processed info
SemanticModelProvider semanticModelProvider = new(compilation);
INamedTypeSymbol? pixelShaderSymbol = structDeclarationSymbol.AllInterfaces.FirstOrDefault(static interfaceSymbol => interfaceSymbol is { IsGenericType: true, Name: nameof(IComputeShader<byte>) });