Added vector indexers to ThreadIds type

このコミットが含まれているのは:
Sergio Pedri committed 2020-12-07 12:32:37 +01:00
1 親 af9a391214
コミット 92817af999
5ファイル変更
+188 -11

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

-4
ファイルの表示
@@ -25,10 +25,6 @@ namespace ComputeSharp.SourceGenerators.Mappings
{
Dictionary<string, string> knownMembers = new()
{
[$"{typeof(ThreadIds).FullName}.{nameof(ThreadIds.X)}"] = "x",
[$"{typeof(ThreadIds).FullName}.{nameof(ThreadIds.Y)}"] = "y",
[$"{typeof(ThreadIds).FullName}.{nameof(ThreadIds.Z)}"] = "z",
[$"{typeof(Vector2).FullName}.{nameof(Vector2.X)}"] = "x",
[$"{typeof(Vector2).FullName}.{nameof(Vector2.Y)}"] = "y",
[$"{typeof(Vector2).FullName}.{nameof(Vector2.Zero)}"] = "(float2)0",
+3 -2
ファイルの表示
@@ -47,14 +47,15 @@ namespace ComputeSharp.SourceGenerators.Mappings
/// <summary>
/// Gets the known HLSL vector types available as mapped types.
/// </summary>
public static IReadOnlyCollection<Type> HlslMappedVectorTypes { get; } = new HashSet<Type>(new[]
public static IReadOnlyCollection<Type> HlslMappedVectorTypes { get; } = new[]
{
typeof(ThreadIds),
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>
/// Checks whether or not a given type name matches a typed resource type.