[clang] [HLSL] Fix intrinsics header file for wave intrinsics using u/int16_t types, updating them to 6.2 (PR #186218)
Tex Riddell via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 12 16:59:09 PDT 2026
================
@@ -30,11 +30,17 @@ namespace hlsl {
#define _HLSL_16BIT_AVAILABILITY_STAGE(platform, version, stage) \
__attribute__(( \
availability(platform, introduced = version, environment = stage)))
+#define _HLSL_16BIT_AVAILABILITY_DEFAULT(shadermodel) \
+ _HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
#else
#define _HLSL_16BIT_AVAILABILITY(environment, version)
#define _HLSL_16BIT_AVAILABILITY_STAGE(environment, version, stage)
+#define _HLSL_16BIT_AVAILABILITY_DEFAULT(shadermodel)
#endif
+#define _HLSL_AVAILABILITY_6_2_DEFAULT(shadermodel) \
+ _HLSL_AVAILABILITY(shadermodel, 6.2)
----------------
tex3d wrote:
I'm trying to argue that we don't need the extra `_HLSL_AVAILABILITY_6_2` macro at all. We should be able to use just `_HLSL_16BIT_AVAILABILITY_DEFAULT()`, since it's always defined for the 16-bit types. For `half` types, you want the availability attribute only when `__HLSL_ENABLE_16_BIT` is defined, because otherwise it maps to `float`.
https://github.com/llvm/llvm-project/pull/186218
More information about the cfe-commits
mailing list