From 3788ae7fc90514ded441f41aba5dbb2b197fa12b Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Sat, 13 Aug 2022 23:04:33 +0200 Subject: [PATCH] Fix Float32ToFloat16 intrinsic signatures --- src/ComputeSharp.Core/Intrinsics/Hlsl.g.cs | 8 ++++---- src/ComputeSharp.Core/Intrinsics/Hlsl.ttinclude | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/ComputeSharp.Core/Intrinsics/Hlsl.g.cs b/src/ComputeSharp.Core/Intrinsics/Hlsl.g.cs index d6e4e502..b59a334d 100644 --- a/src/ComputeSharp.Core/Intrinsics/Hlsl.g.cs +++ b/src/ComputeSharp.Core/Intrinsics/Hlsl.g.cs @@ -7712,7 +7712,7 @@ partial class Hlsl /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. /// [HlslIntrinsicName("f32tof16")] - public static float Float32ToFloat16(uint x) => default; + public static uint Float32ToFloat16(float x) => default; /// /// Converts the input float value into a 16-bit floating point value stored in the lower half of the returned value. @@ -7724,7 +7724,7 @@ partial class Hlsl /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. /// [HlslIntrinsicName("f32tof16")] - public static Float2 Float32ToFloat16(UInt2 x) => default; + public static UInt2 Float32ToFloat16(Float2 x) => default; /// /// Converts the input float value into a 16-bit floating point value stored in the lower half of the returned value. @@ -7736,7 +7736,7 @@ partial class Hlsl /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. /// [HlslIntrinsicName("f32tof16")] - public static Float3 Float32ToFloat16(UInt3 x) => default; + public static UInt3 Float32ToFloat16(Float3 x) => default; /// /// Converts the input float value into a 16-bit floating point value stored in the lower half of the returned value. @@ -7748,7 +7748,7 @@ partial class Hlsl /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. /// [HlslIntrinsicName("f32tof16")] - public static Float4 Float32ToFloat16(UInt4 x) => default; + public static UInt4 Float32ToFloat16(Float4 x) => default; /// /// Converts the 16-bit floating point value stored in the lower half of the input value to a . diff --git a/src/ComputeSharp.Core/Intrinsics/Hlsl.ttinclude b/src/ComputeSharp.Core/Intrinsics/Hlsl.ttinclude index ae70d55d..10f4e195 100644 --- a/src/ComputeSharp.Core/Intrinsics/Hlsl.ttinclude +++ b/src/ComputeSharp.Core/Intrinsics/Hlsl.ttinclude @@ -1125,10 +1125,10 @@ var Intrinsics = new[] Returns = "The converted value, stored in the low-half of the uint.", Overloads = new[] { - new { Return = "float", Params = new[] { "uint" } }, - new { Return = "Float2", Params = new[] { "UInt2" } }, - new { Return = "Float3", Params = new[] { "UInt3" } }, - new { Return = "Float4", Params = new[] { "UInt4" } } + new { Return = "uint", Params = new[] { "float" } }, + new { Return = "UInt2", Params = new[] { "Float2" } }, + new { Return = "UInt3", Params = new[] { "Float3" } }, + new { Return = "UInt4", Params = new[] { "Float4" } } } }, new