[clang] [HLSL] Add additional overloads for min and max to allow for mixed scalar and vector arguments (PR #129334)
Joshua Batista via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 28 15:09:19 PST 2025
================
@@ -1678,6 +1678,30 @@ half3 max(half3, half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_max)
half4 max(half4, half4);
+_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
+constexpr half2 max(half2 p0, half p1) {
----------------
bob80905 wrote:
If a user were to call the max function with, say, a half2 and a half3, is it our intention to reject that / emit an error?
https://github.com/llvm/llvm-project/pull/129334
More information about the cfe-commits
mailing list