Fixed build errors in the unit test projects

このコミットが含まれているのは:
Sergio Pedri committed 2021-02-18 00:37:55 +01:00
1 親 707f0be5c4
コミット 103f3abbe1
4ファイル変更
+25 -5

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

+6 -3
ファイルの表示
@@ -121,13 +121,16 @@ namespace ComputeSharp.SourceGenerators
continue;
}
string metadataName = typeSymbol.GetFullMetadataName();
// Track the type of items in the current buffer
if (HlslKnownTypes.IsTypedResourceType(typeSymbol.GetFullMetadataName()) &&
typeSymbol.TypeArguments.Length == 1)
if (HlslKnownTypes.IsStructuredBufferType(metadataName))
{
types.Add((INamedTypeSymbol)typeSymbol.TypeArguments[0]);
}
else if (!typeSymbol.IsUnmanagedType)
else if (!HlslKnownTypes.IsTypedResourceType(metadataName) &&
!typeSymbol.IsUnmanagedType &&
typeSymbol.TypeKind != TypeKind.Delegate)
{
// Shaders can only capture valid HLSL resource types or unmanaged types
context.ReportDiagnostic(Diagnostic.Create(