Move known samplers to HlslKnownMethods type

このコミットが含まれているのは:
Sergio Pedri committed 2022-08-09 17:37:55 +02:00
1 親 6c75394e22
コミット 0dd0bd587a
6ファイル変更
+62 -55

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

+22
ファイルの表示
@@ -149,6 +149,28 @@ internal static partial class HlslKnownMethods
/// <param name="knownMethods">The mapping of known methods being built.</param>
static partial void AddKnownMethods(IDictionary<string, string> knownMethods);
/// <summary>
/// The mapping of supported known samplers to HLSL resource type names.
/// </summary>
private static readonly IReadOnlyDictionary<string, string?> KnownResourceSamplers = BuildKnownResourceSamplers();
/// <summary>
/// Builds the mapping of supported known samplers to HLSL resource type names.
/// </summary>
/// <returns>The mapping of supported known samplers to HLSL resource type names.</returns>
private static partial IReadOnlyDictionary<string, string?> BuildKnownResourceSamplers();
/// <summary>
/// Tries to get the mapped HLSL-compatible sampler resource type name for the input indexer name.
/// </summary>
/// <param name="name">The input fully qualified indexer name.</param>
/// <param name="mapped">The mapped type name, if one is found.</param>
/// <returns>The HLSL-compatible type name that can be used in an HLSL shader for the given sampler.</returns>
public static bool TryGetMappedResourceSamplerAccessType(string name, out string? mapped)
{
return KnownResourceSamplers.TryGetValue(name, out mapped);
}
/// <summary>
/// Tries to get the mapped HLSL-compatible method name for the input method name.
/// </summary>
-22
ファイルの表示
@@ -220,17 +220,6 @@ internal static partial class HlslKnownProperties
/// <returns>The mapping of supported known indexers to HLSL resource type names.</returns>
private static partial IReadOnlyDictionary<string, string> BuildKnownResourceIndexers();
/// <summary>
/// The mapping of supported known samplers to HLSL resource type names.
/// </summary>
private static readonly IReadOnlyDictionary<string, string?> KnownResourceSamplers = BuildKnownResourceSamplers();
/// <summary>
/// Builds the mapping of supported known samplers to HLSL resource type names.
/// </summary>
/// <returns>The mapping of supported known samplers to HLSL resource type names.</returns>
private static partial IReadOnlyDictionary<string, string?> BuildKnownResourceSamplers();
/// <summary>
/// The mapping of supported known size accessors for HLSL resource types.
/// </summary>
@@ -284,17 +273,6 @@ internal static partial class HlslKnownProperties
return KnownResourceIndexers.TryGetValue(name, out mapped);
}
/// <summary>
/// Tries to get the mapped HLSL-compatible sampler resource type name for the input indexer name.
/// </summary>
/// <param name="name">The input fully qualified indexer name.</param>
/// <param name="mapped">The mapped type name, if one is found.</param>
/// <returns>The HLSL-compatible type name that can be used in an HLSL shader for the given sampler.</returns>
public static bool TryGetMappedResourceSamplerAccessType(string name, out string? mapped)
{
return KnownResourceSamplers.TryGetValue(name, out mapped);
}
/// <summary>
/// Tries to get the mapped rank and axis for a given indexer name.
/// </summary>