Add texture 1D mappings to source generator

このコミットが含まれているのは:
Sergio Pedri committed 2022-08-31 02:31:00 +02:00
1 親 8c5ce3a1d7
コミット 8c7c659aa3
3ファイル変更
+28

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

+3
ファイルの表示
@@ -10,6 +10,9 @@ partial class HlslKnownMethods
{
return new Dictionary<string, string?>
{
[$"ComputeSharp.ReadOnlyTexture1D`2.Sample({typeof(float).FullName})"] = null,
[$"ComputeSharp.IReadOnlyTexture1D`1.Sample({typeof(float).FullName})"] = null,
[$"ComputeSharp.IReadOnlyNormalizedTexture1D`1.Sample({typeof(float).FullName})"] = null,
[$"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",
+4
ファイルの表示
@@ -38,21 +38,25 @@ partial class HlslKnownProperties
return new Dictionary<string, (int, int)>
{
["ComputeSharp.Resources.Buffer`1.Length"] = (2, 0),
["ComputeSharp.Resources.Texture1D`1.Width"] = (1, 0),
["ComputeSharp.Resources.Texture2D`1.Width"] = (2, 0),
["ComputeSharp.Resources.Texture2D`1.Height"] = (2, 1),
["ComputeSharp.Resources.Texture3D`1.Width"] = (3, 0),
["ComputeSharp.Resources.Texture3D`1.Height"] = (3, 1),
["ComputeSharp.Resources.Texture3D`1.Depth"] = (3, 2),
["ComputeSharp.IReadOnlyTexture1D`1.Width"] = (1, 0),
["ComputeSharp.IReadOnlyTexture2D`1.Width"] = (2, 0),
["ComputeSharp.IReadOnlyTexture2D`1.Height"] = (2, 1),
["ComputeSharp.IReadOnlyTexture3D`1.Width"] = (3, 0),
["ComputeSharp.IReadOnlyTexture3D`1.Height"] = (3, 1),
["ComputeSharp.IReadOnlyTexture3D`1.Depth"] = (3, 2),
["ComputeSharp.IReadOnlyNormalizedTexture1D`1.Width"] = (1, 0),
["ComputeSharp.IReadOnlyNormalizedTexture2D`1.Width"] = (2, 0),
["ComputeSharp.IReadOnlyNormalizedTexture2D`1.Height"] = (2, 1),
["ComputeSharp.IReadOnlyNormalizedTexture3D`1.Width"] = (3, 0),
["ComputeSharp.IReadOnlyNormalizedTexture3D`1.Height"] = (3, 1),
["ComputeSharp.IReadOnlyNormalizedTexture3D`1.Depth"] = (3, 2),
["ComputeSharp.IReadWriteNormalizedTexture1D`1.Width"] = (1, 0),
["ComputeSharp.IReadWriteNormalizedTexture2D`1.Width"] = (2, 0),
["ComputeSharp.IReadWriteNormalizedTexture2D`1.Height"] = (2, 1),
["ComputeSharp.IReadWriteNormalizedTexture3D`1.Width"] = (3, 0),
+21
ファイルの表示
@@ -55,12 +55,16 @@ partial class HlslKnownTypes
return typeName switch
{
"ComputeSharp.ReadOnlyBuffer`1" or
"ComputeSharp.ReadOnlyTexture1D`1" or
"ComputeSharp.ReadOnlyTexture1D`2" or
"ComputeSharp.ReadOnlyTexture2D`1" or
"ComputeSharp.ReadOnlyTexture2D`2" or
"ComputeSharp.ReadOnlyTexture3D`1" or
"ComputeSharp.ReadOnlyTexture3D`2" or
"ComputeSharp.IReadOnlyTexture1D`1" or
"ComputeSharp.IReadOnlyTexture2D`1" or
"ComputeSharp.IReadOnlyTexture3D`1" => true,
"ComputeSharp.IReadOnlyNormalizedTexture1D`1" or
"ComputeSharp.IReadOnlyNormalizedTexture2D`1" or
"ComputeSharp.IReadOnlyNormalizedTexture3D`1" => true,
_ => false
@@ -77,10 +81,13 @@ partial class HlslKnownTypes
return typeName switch
{
"ComputeSharp.ReadWriteBuffer`1" or
"ComputeSharp.ReadWriteTexture1D`1" or
"ComputeSharp.ReadWriteTexture1D`2" or
"ComputeSharp.ReadWriteTexture2D`1" or
"ComputeSharp.ReadWriteTexture2D`2" or
"ComputeSharp.ReadWriteTexture3D`1" or
"ComputeSharp.ReadWriteTexture3D`2" or
"ComputeSharp.IReadWriteNormalizedTexture1D`1" or
"ComputeSharp.IReadWriteNormalizedTexture2D`1" or
"ComputeSharp.IReadWriteNormalizedTexture3D`1" => true,
_ => false
@@ -99,16 +106,23 @@ partial class HlslKnownTypes
"ComputeSharp.ConstantBuffer`1" or
"ComputeSharp.ReadOnlyBuffer`1" or
"ComputeSharp.ReadWriteBuffer`1" or
"ComputeSharp.ReadOnlyTexture1D`1" or
"ComputeSharp.ReadOnlyTexture1D`2" or
"ComputeSharp.ReadOnlyTexture2D`1" or
"ComputeSharp.ReadOnlyTexture2D`2" or
"ComputeSharp.ReadWriteTexture1D`1" or
"ComputeSharp.ReadWriteTexture1D`2" or
"ComputeSharp.ReadWriteTexture2D`1" or
"ComputeSharp.ReadWriteTexture2D`2" or
"ComputeSharp.ReadOnlyTexture3D`1" or
"ComputeSharp.ReadOnlyTexture3D`2" or
"ComputeSharp.ReadWriteTexture3D`1" or
"ComputeSharp.ReadWriteTexture3D`2" or
"ComputeSharp.IReadOnlyTexture1D`1" or
"ComputeSharp.IReadOnlyTexture2D`1" or
"ComputeSharp.IReadOnlyTexture3D`1" or
"ComputeSharp.IReadOnlyNormalizedTexture1D`1" or
"ComputeSharp.IReadWriteNormalizedTexture1D`1" or
"ComputeSharp.IReadOnlyNormalizedTexture2D`1" or
"ComputeSharp.IReadWriteNormalizedTexture2D`1" or
"ComputeSharp.IReadOnlyNormalizedTexture3D`1" or
@@ -143,6 +157,10 @@ partial class HlslKnownTypes
"ComputeSharp.ConstantBuffer`1" => mappedElementType,
"ComputeSharp.ReadOnlyBuffer`1" => $"StructuredBuffer<{mappedElementType}>",
"ComputeSharp.ReadWriteBuffer`1" => $"RWStructuredBuffer<{mappedElementType}>",
"ComputeSharp.ReadOnlyTexture1D`1" => $"Texture1D<{mappedElementType}>",
"ComputeSharp.ReadOnlyTexture1D`2" => $"Texture1D<unorm {mappedElementType}>",
"ComputeSharp.ReadWriteTexture1D`1" => $"RWTexture1D<{mappedElementType}>",
"ComputeSharp.ReadWriteTexture1D`2" => $"RWTexture1D<unorm {mappedElementType}>",
"ComputeSharp.ReadOnlyTexture2D`1" => $"Texture2D<{mappedElementType}>",
"ComputeSharp.ReadOnlyTexture2D`2" => $"Texture2D<unorm {mappedElementType}>",
"ComputeSharp.ReadWriteTexture2D`1" => $"RWTexture2D<{mappedElementType}>",
@@ -151,8 +169,11 @@ partial class HlslKnownTypes
"ComputeSharp.ReadOnlyTexture3D`2" => $"Texture3D<unorm {mappedElementType}>",
"ComputeSharp.ReadWriteTexture3D`1" => $"RWTexture3D<{mappedElementType}>",
"ComputeSharp.ReadWriteTexture3D`2" => $"RWTexture3D<unorm {mappedElementType}>",
"ComputeSharp.IReadOnlyTexture1D`1" => $"Texture1D<{mappedElementType}>",
"ComputeSharp.IReadOnlyTexture2D`1" => $"Texture2D<{mappedElementType}>",
"ComputeSharp.IReadOnlyTexture3D`1" => $"Texture3D<{mappedElementType}>",
"ComputeSharp.IReadOnlyNormalizedTexture1D`1" => $"Texture1D<unorm {mappedElementType}>",
"ComputeSharp.IReadWriteNormalizedTexture1D`1" => $"RWTexture1D<unorm {mappedElementType}>",
"ComputeSharp.IReadOnlyNormalizedTexture2D`1" => $"Texture2D<unorm {mappedElementType}>",
"ComputeSharp.IReadWriteNormalizedTexture2D`1" => $"RWTexture2D<unorm {mappedElementType}>",
"ComputeSharp.IReadOnlyNormalizedTexture3D`1" => $"Texture3D<unorm {mappedElementType}>",