Switched supported HLSL intrinsics to default return
このコミットが含まれているのは:
1 親
5d87fa910b
コミット
01ba13dfe9
2ファイル変更
+3144
-3053
検索条件に一致するファイルはありません
+3130
-3050
ファイル差分が大きすぎるため表示されません。
差分を読み込み
@@ -37,16 +37,27 @@ foreach (var intrinsic in Intrinsics)
|
||||
WriteLine($"/// <returns>{returns}</returns>");
|
||||
}
|
||||
|
||||
WriteLine("/// <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>");
|
||||
|
||||
if (intrinsic.IsPure) WriteLine("[Pure]");
|
||||
WriteLine($"[HlslIntrinsicName(\"{intrinsic.HlslName}\")]");
|
||||
|
||||
Write($"public static {overload.Return} {intrinsic.Name}(");
|
||||
Write(string.Join(", ", intrinsic.Parameters.Zip(overload.Params, (a, b) => $"{(a.IsOut ? "out " : "")}{b} {a.Name}")));
|
||||
Write(") => throw new InvalidExecutionContextException(");
|
||||
Write(")");
|
||||
|
||||
var parameters = string.Join(", ", overload.Params.Select(t => $"{{typeof({t})}}"));
|
||||
if (intrinsic.Parameters.Any(param => param.IsOut))
|
||||
{
|
||||
Write(" => throw new InvalidExecutionContextException(");
|
||||
|
||||
WriteLine($"$\"{{typeof(Hlsl)}}.{{nameof({intrinsic.Name})}}({parameters})\");");
|
||||
var parameters = string.Join(", ", overload.Params.Select(t => $"{{typeof({t})}}"));
|
||||
|
||||
WriteLine($"$\"{{typeof(Hlsl)}}.{{nameof({intrinsic.Name})}}({parameters})\");");
|
||||
}
|
||||
else
|
||||
{
|
||||
Write(" => default;");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする