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

Farzon Lotfi via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 8 12:19:14 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)
----------------
farzonl wrote:

THe fvector terminology used by the DirectX spec is confusing I'd be happier with vector<T, 4>.  We tend to just use a Templated definition if there are multiple overloads to indicate which arguments and return types are the same see examples

```
/// \fn K distance(T X, T Y)
// \fn T fmod(T X, T Y)
```

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


More information about the cfe-commits mailing list