Move domain specific code to HlslKnownTypes
このコミットが含まれているのは:
1 親
5f58823305
コミット
ae717681c4
6ファイル変更
+70
-60
検索条件に一致するファイルはありません
@@ -365,6 +365,26 @@ internal static class HlslKnownTypes
|
||||
return KnownHlslTypes.TryGetValue(originalName, out mappedName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tracks an <see cref="ITypeSymbol"/> instance and returns an HLSL compatible type name.
|
||||
/// </summary>
|
||||
/// <param name="typeSymbol">The input <see cref="ITypeSymbol"/> instance to process.</param>
|
||||
/// <param name="discoveredTypes">The collection of currently discovered types.</param>
|
||||
/// <returns>A type name that represents a type compatible with HLSL.</returns>
|
||||
public static string TrackType(ITypeSymbol typeSymbol, ICollection<INamedTypeSymbol> discoveredTypes)
|
||||
{
|
||||
string typeName = typeSymbol.GetFullyQualifiedName();
|
||||
|
||||
discoveredTypes.Add((INamedTypeSymbol)typeSymbol);
|
||||
|
||||
if (TryGetMappedName(typeName, out string? mappedName))
|
||||
{
|
||||
return mappedName!;
|
||||
}
|
||||
|
||||
return typeName.ToHlslIdentifierName();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the sequence of unique custom types from a collection of discovered types.
|
||||
/// </summary>
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする