================
@@ -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
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits