[clang] [HLSL] Overloads for `lerp` with a scalar weight (PR #137877)

Justin Bogner via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 29 15:24:38 PDT 2025


================
@@ -277,6 +277,12 @@ constexpr bool4 isinf(double4 V) { return isinf((float4)V); }
 // lerp builtins overloads
 //===----------------------------------------------------------------------===//
 
+template <typename T, uint N>
+constexpr __detail::enable_if_t<(N > 1 && N <= 4), vector<T, N>>
----------------
bogner wrote:

I also think it feels a bit odd, but I was following the examples from [clamp](https://github.com/llvm/llvm-project/issues#128230) and [min/max](https://github.com/llvm/llvm-project/issues#128231). I think if we're going to move them, we should do all of these together.

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


More information about the cfe-commits mailing list