Added leftover types mapping dictionary

このコミットが含まれているのは:
Sergio Pedri committed 2020-11-25 15:21:08 +01:00
1 親 e6be10436a
コミット 646426042c
1ファイル変更
+14 -1
+14 -1
ファイルの表示
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Numerics;
namespace ComputeSharp.SourceGenerators.Mappings
@@ -42,6 +43,18 @@ namespace ComputeSharp.SourceGenerators.Mappings
["ComputeSharp.ReadWriteBuffer<T>"] = "RWStructuredBuffer"
};
/// <summary>
/// Gets the known HLSL vector types available as mapped types.
/// </summary>
public static IReadOnlyCollection<Type> HlslMappedVectorTypes { get; } = new HashSet<Type>(new[]
{
typeof(Bool2), typeof(Bool3), typeof(Bool4),
typeof(Int2), typeof(Int3), typeof(Int4),
typeof(UInt2), typeof(UInt3), typeof(UInt4),
typeof(Float2), typeof(Float3), typeof(Float4),
typeof(Double2), typeof(Double3), typeof(Double4)
});
/// <summary>
/// Gets the mapped HLSL-compatible type name for the input type name.
/// </summary>