Move known samplers to HlslKnownMethods type

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

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

+27
ファイルの表示
@@ -0,0 +1,27 @@
using System.Collections.Generic;
namespace ComputeSharp.SourceGeneration.Mappings;
/// <inheritdoc/>
partial class HlslKnownMethods
{
/// <inheritdoc/>
private static partial IReadOnlyDictionary<string, string?> BuildKnownResourceSamplers()
{
return new Dictionary<string, string?>
{
[$"ComputeSharp.ReadOnlyTexture2D`2.Sample({typeof(float).FullName}, {typeof(float).FullName})"] = "float2",
[$"ComputeSharp.ReadOnlyTexture2D`2.Sample({typeof(Float2).FullName})"] = null,
[$"ComputeSharp.IReadOnlyTexture2D`1.Sample({typeof(float).FullName}, {typeof(float).FullName})"] = "float2",
[$"ComputeSharp.IReadOnlyTexture2D`1.Sample({typeof(Float2).FullName})"] = null,
[$"ComputeSharp.IReadOnlyNormalizedTexture2D`1.Sample({typeof(float).FullName}, {typeof(float).FullName})"] = "float2",
[$"ComputeSharp.IReadOnlyNormalizedTexture2D`1.Sample({typeof(Float2).FullName})"] = null,
[$"ComputeSharp.ReadOnlyTexture3D`2.Sample({typeof(float).FullName}, {typeof(float).FullName}, {typeof(float).FullName})"] = "float3",
[$"ComputeSharp.ReadOnlyTexture3D`2.Sample({typeof(Float3).FullName})"] = null,
[$"ComputeSharp.IReadOnlyTexture3D`1.Sample({typeof(float).FullName}, {typeof(float).FullName}, {typeof(float).FullName})"] = "float3",
[$"ComputeSharp.IReadOnlyTexture3D`1.Sample({typeof(Float3).FullName})"] = null,
[$"ComputeSharp.IReadOnlyNormalizedTexture3D`1.Sample({typeof(float).FullName}, {typeof(float).FullName}, {typeof(float).FullName})"] = "float3",
[$"ComputeSharp.IReadOnlyNormalizedTexture3D`1.Sample({typeof(Float3).FullName})"] = null
};
}
}
-20
ファイルの表示
@@ -32,26 +32,6 @@ partial class HlslKnownProperties
};
}
/// <inheritdoc/>
private static partial IReadOnlyDictionary<string, string?> BuildKnownResourceSamplers()
{
return new Dictionary<string, string?>
{
[$"ComputeSharp.ReadOnlyTexture2D`2.this[{typeof(float).FullName}, {typeof(float).FullName}]"] = "float2",
[$"ComputeSharp.ReadOnlyTexture2D`2.this[{typeof(Float2).FullName}]"] = null,
[$"ComputeSharp.IReadOnlyTexture2D`1.this[{typeof(float).FullName}, {typeof(float).FullName}]"] = "float2",
[$"ComputeSharp.IReadOnlyTexture2D`1.this[{typeof(Float2).FullName}]"] = null,
[$"ComputeSharp.IReadOnlyNormalizedTexture2D`1.this[{typeof(float).FullName}, {typeof(float).FullName}]"] = "float2",
[$"ComputeSharp.IReadOnlyNormalizedTexture2D`1.this[{typeof(Float2).FullName}]"] = null,
[$"ComputeSharp.ReadOnlyTexture3D`2.this[{typeof(float).FullName}, {typeof(float).FullName}, {typeof(float).FullName}]"] = "float3",
[$"ComputeSharp.ReadOnlyTexture3D`2.this[{typeof(Float3).FullName}]"] = null,
[$"ComputeSharp.IReadOnlyTexture3D`1.this[{typeof(float).FullName}, {typeof(float).FullName}, {typeof(float).FullName}]"] = "float3",
[$"ComputeSharp.IReadOnlyTexture3D`1.this[{typeof(Float3).FullName}]"] = null,
[$"ComputeSharp.IReadOnlyNormalizedTexture3D`1.this[{typeof(float).FullName}, {typeof(float).FullName}, {typeof(float).FullName}]"] = "float3",
[$"ComputeSharp.IReadOnlyNormalizedTexture3D`1.this[{typeof(Float3).FullName}]"] = null
};
}
/// <inheritdoc/>
private static partial IReadOnlyDictionary<string, (int Rank, int Axis)> BuildKnownSizeAccessors()
{