From a10a94dcb86e51d74d7c545d99d98110f88e3081 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Tue, 16 Aug 2022 16:24:37 -0400 Subject: Add some simple macro defines including __HLSL_VERSION (#2363) * #include an absolute path didn't work - because paths were taken to always be relative. * Add standard macros including __HLSL_VERSION * Added hlsl test. * Defined standard macro names to values, so not undefined. Allows more convenient #if style. Co-authored-by: Yong He --- tests/preprocessor/simple-pre-defined.hlsl | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 tests/preprocessor/simple-pre-defined.hlsl (limited to 'tests/preprocessor/simple-pre-defined.hlsl') diff --git a/tests/preprocessor/simple-pre-defined.hlsl b/tests/preprocessor/simple-pre-defined.hlsl new file mode 100644 index 000000000..7789eb8eb --- /dev/null +++ b/tests/preprocessor/simple-pre-defined.hlsl @@ -0,0 +1,9 @@ +//DIAGNOSTIC_TEST:SIMPLE:-E + +__SLANG_COMPILER__ + +__HLSL_VERSION + +__SLANG__ + +__HLSL__ \ No newline at end of file -- cgit v1.2.3