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

Farzon Lotfi via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 8 12:30:59 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, _}
+/// \param Src1 [in] The second vector contains the reciprocal distance
+/// represented as  {_, 1/d, _, 1/d}
----------------
farzonl wrote:

```suggestion
/// \param Src1 [in] Contains the reciprocal distance
```

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


More information about the cfe-commits mailing list