Add HlslIntrinsicNameAttribute.RequiresParametersMatching property

このコミットが含まれているのは:
Sergio Pedri committed 2022-08-27 03:10:49 +02:00
1 親 57e3bb5fd7
コミット 24ed41afa4
3ファイル変更
+167 -162

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

+5
ファイルの表示
@@ -23,4 +23,9 @@ internal sealed class HlslIntrinsicNameAttribute : Attribute
/// Gets the name of the HLSL intrinsic.
/// </summary>
public string Name { get; }
/// <summary>
/// Gets whether or not matching parameters is also required to extract the name of this intrinsic.
/// </summary>
public bool RequiresParametersMatching { get; init; }
}
ファイル差分が大きすぎるため表示されません。 差分を読み込み
+2 -2
ファイルの表示
@@ -52,7 +52,7 @@ foreach (var intrinsic in intrinsics)
/// <param name="x">The input <see cref="<#=pair.Source#>"/> value.</param>
/// <returns>The converted <see cref="<#=pair.Target#>"/> value.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[HlslIntrinsicName("<#=pair.Target.ToLower()#>")]
[HlslIntrinsicName("<#=pair.Target.ToLower()#>", RequiresParametersMatching = true)]
public static <#=pair.Target#> <#=intrinsic.Type#>ToBool(<#=pair.Source#> x) => default;
<#
}
@@ -71,7 +71,7 @@ foreach (var intrinsic in intrinsics)
/// <param name="x">The input <see cref="<#=pair.Target#>"/> value.</param>
/// <returns>The converted <see cref="<#=pair.Source#>"/> value.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
[HlslIntrinsicName("<#=pair.Source.ToLower()#>")]
[HlslIntrinsicName("<#=pair.Source.ToLower()#>", RequiresParametersMatching = true)]
public static <#=pair.Source#> BoolTo<#=intrinsic.Type#>(<#=pair.Target#> x) => default;
<#
}