Enabled shader generation for texture indexer overloads

このコミットが含まれているのは:
Sergio Pedri committed 2020-12-07 17:51:50 +01:00
1 親 c262cd5519
コミット c208dc29b1
4ファイル変更
+60 -1

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

+20
ファイルの表示
@@ -74,6 +74,26 @@ namespace ComputeSharp.SourceGenerators.Extensions
return symbol.ToDisplayString(FullyQualifiedWithoutGlobalAndParametersFormat);
}
/// <summary>
/// Gets the full metadata name for a given <see cref="IPropertySymbol"/> instance.
/// </summary>
/// <param name="symbol">The input <see cref="IPropertySymbol"/> instance.</param>
/// <returns>The full metadata name for <paramref name="symbol"/>.</returns>
[Pure]
public static string GetFullMetadataName(this IPropertySymbol symbol)
{
string declaringTypeName = symbol.ContainingType.GetFullMetadataName();
if (symbol.IsIndexer)
{
var parameters = string.Join(", ", symbol.Parameters.Select(static p => ((INamedTypeSymbol)p.Type).GetFullMetadataName()));
return $"{declaringTypeName}.this[{parameters}]";
}
return $"{declaringTypeName}.{symbol.Name}";
}
/// <summary>
/// Gets a valid filename for a target symbol and generator type.
/// </summary>