[clang] [HLSL] Add 6.2 SM on half availability for length intrinsic (PR #122337)

Finn Plummer via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 9 11:07:28 PST 2025


================
@@ -1297,9 +1297,11 @@ float4 lerp(float4, float4, float4);
 ///
 /// Length is based on the following formula: sqrt(x[0]^2 + x[1]^2 + ...).
 
+_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
 const inline half length(half X) { return __detail::length_impl(X); }
 const inline float length(float X) { return __detail::length_impl(X); }
----------------
inbelic wrote:

Do we need `_HLSL_AVAILABILITY(shadermodel, 6.2)` on the none half variants?

https://github.com/llvm/llvm-project/pull/122337


More information about the cfe-commits mailing list