[clang] [HLSL] Add matrix support to atan2 (PR #194984)
Deric C. via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 30 14:50:13 PDT 2026
================
@@ -230,6 +230,41 @@ namespace hlsl {
return fn((float4)V1, (float4)V2, (float4)V3); \
}
+#define _DXC_COMPAT_BINARY_DOUBLE_MATRIX_OVERLOADS(fn) \
+ template <uint R, uint C> \
+ _DXC_DEPRECATED_64BIT_FN(fn) \
+ constexpr matrix<float, R, C> fn(matrix<double, R, C> y, \
+ matrix<double, R, C> x) { \
+ return fn((matrix<float, R, C>)y, (matrix<float, R, C>)x); \
+ }
+
+#define _DXC_COMPAT_BINARY_INTEGER_MATRIX_OVERLOADS(fn) \
+ template <uint R, uint C> \
+ _DXC_DEPRECATED_INT_FN(fn) \
+ constexpr matrix<float, R, C> fn(matrix<int, R, C> y, matrix<int, R, C> x) { \
+ return fn((matrix<float, R, C>)y, (matrix<float, R, C>)x); \
+ } \
+ \
+ template <uint R, uint C> \
+ _DXC_DEPRECATED_INT_FN(fn) \
+ constexpr matrix<float, R, C> fn(matrix<uint, R, C> y, \
+ matrix<uint, R, C> x) { \
+ return fn((matrix<float, R, C>)y, (matrix<float, R, C>)x); \
+ } \
+ \
+ template <uint R, uint C> \
+ _DXC_DEPRECATED_INT_FN(fn) \
+ constexpr matrix<float, R, C> fn(matrix<int64_t, R, C> y, \
+ matrix<int64_t, R, C> x) { \
+ return fn((matrix<float, R, C>)y, (matrix<float, R, C>)x); \
+ } \
+ \
+ template <uint R, uint C> \
+ _DXC_DEPRECATED_INT_FN(fn) \
+ constexpr matrix<float, R, C> fn(matrix<uint64_t, R, C> y, \
+ matrix<uint64_t, R, C> x) { \
+ return fn((matrix<float, R, C>)y, (matrix<float, R, C>)x); \
+ }
----------------
Icohedron wrote:
nit: missing blank line before next section header
```suggestion
}
```
https://github.com/llvm/llvm-project/pull/194984
More information about the cfe-commits
mailing list