Introduced IPixelShader<TPixel> interface, initial working support

このコミットが含まれているのは:
Sergio Pedri committed 2021-05-11 01:54:37 +02:00
1 親 0a0f51bd5f
コミット 49d73b675f
15ファイル変更
+285 -23

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

+3 -1
ファイルの表示
@@ -29,7 +29,9 @@ namespace ComputeSharp.SourceGenerators
{
if (context.Node is StructDeclarationSyntax structDeclaration &&
context.SemanticModel.GetDeclaredSymbol(structDeclaration) is INamedTypeSymbol structSymbol &&
structSymbol.Interfaces.Any(static interfaceSymbol => interfaceSymbol.Name == nameof(IComputeShader)))
structSymbol.Interfaces.Any(static interfaceSymbol =>
interfaceSymbol.Name == nameof(IComputeShader) ||
interfaceSymbol is { IsGenericType: true, Name: nameof(IPixelShader<byte>) }))
{
this.gatheredInfo.Add(new Item(structDeclaration, structSymbol));
}