Share known properties with D2D1 generator, add D2D1 mappings
このコミットが含まれているのは:
1 親
ecb8991807
コミット
eda4bd43ff
3ファイル変更
+187
-107
検索条件に一致するファイルはありません
@@ -0,0 +1,44 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace ComputeSharp.SourceGeneration.Mappings;
|
||||
|
||||
/// <inheritdoc/>
|
||||
partial class HlslKnownProperties
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
private static partial IReadOnlyDictionary<string, string> BuildKnownResourceIndexers()
|
||||
{
|
||||
return new Dictionary<string, string>
|
||||
{
|
||||
[$"ComputeSharp.D2D1.D2D1ResourceTexture2D.this[{typeof(int).FullName}, {typeof(int).FullName}]"] = "int2",
|
||||
[$"ComputeSharp.D2D1.D2D1ResourceTexture3D.this[{typeof(int).FullName}, {typeof(int).FullName}, {typeof(int).FullName}]"] = "int3"
|
||||
};
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
private static partial IReadOnlyDictionary<string, string?> BuildKnownResourceSamplers()
|
||||
{
|
||||
return new Dictionary<string, string?>
|
||||
{
|
||||
[$"ComputeSharp.D2D1.D2D1ResourceTexture1D.this[{typeof(float).FullName}]"] = null,
|
||||
[$"ComputeSharp.D2D1.D2D1ResourceTexture2D.this[{typeof(float).FullName}, {typeof(float).FullName}]"] = "float2",
|
||||
[$"ComputeSharp.D2D1.D2D1ResourceTexture2D.this[{typeof(Float2).FullName}]"] = null,
|
||||
[$"ComputeSharp.D2D1.D2D1ResourceTexture3D.this[{typeof(float).FullName}, {typeof(float).FullName}, {typeof(float).FullName}]"] = "float3",
|
||||
[$"ComputeSharp.D2D1.D2D1ResourceTexture3D.this[{typeof(Float3).FullName}]"] = null
|
||||
};
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
private static partial IReadOnlyDictionary<string, (int Rank, int Axis)> BuildKnownSizeAccessors()
|
||||
{
|
||||
return new Dictionary<string, (int, int)>
|
||||
{
|
||||
["ComputeSharp.D2D1.D2D1ResourceTexture1D.Width"] = (1, 0),
|
||||
["ComputeSharp.D2D1.D2D1ResourceTexture2D.Width"] = (2, 0),
|
||||
["ComputeSharp.D2D1.D2D1ResourceTexture2D.Height"] = (2, 1),
|
||||
["ComputeSharp.D2D1.D2D1ResourceTexture3D.Width"] = (3, 0),
|
||||
["ComputeSharp.D2D1.D2D1ResourceTexture3D.Height"] = (3, 1),
|
||||
["ComputeSharp.D2D1.D2D1ResourceTexture3D.Depth"] = (3, 2)
|
||||
};
|
||||
}
|
||||
}
|
||||
新しいイシューから参照
ユーザーをブロックする