[clang] [HLSL] Implement the dst HLSL Function (PR #133828)

via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 8 12:41:34 PDT 2025


================
@@ -190,6 +190,32 @@ const inline float dot2add(half2 A, half2 B, float C) {
   return __detail::dot2add_impl(A, B, C);
 }
 
+//===----------------------------------------------------------------------===//
+// dst builtins
+//===----------------------------------------------------------------------===//
+
+/// \fn fvector dst(fvector, fvector)
+/// \brief Calculates a distance vector.
+/// \param Src0 [in] The first vector contains the squared distance represented
+/// as {_, d*d, d*d, _}
----------------
metkarpoonam wrote:

Sure, I will shorten the description. However, d represents the distance, and the argument contains the square of the distance.

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


More information about the cfe-commits mailing list