summaryrefslogtreecommitdiffstats
path: root/tests/preprocessor/simple-pre-defined.slang
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2022-08-16 16:24:37 -0400
committerGitHub <noreply@github.com>2022-08-16 13:24:37 -0700
commita10a94dcb86e51d74d7c545d99d98110f88e3081 (patch)
tree03da2e66ff793aa4f68a23a47a81d5cbb097206e /tests/preprocessor/simple-pre-defined.slang
parent42de00db3ffe07599fff6d47d0d7228181ee3082 (diff)
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 <yonghe@outlook.com>
Diffstat (limited to 'tests/preprocessor/simple-pre-defined.slang')
-rw-r--r--tests/preprocessor/simple-pre-defined.slang9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/preprocessor/simple-pre-defined.slang b/tests/preprocessor/simple-pre-defined.slang
new file mode 100644
index 000000000..7789eb8eb
--- /dev/null
+++ b/tests/preprocessor/simple-pre-defined.slang
@@ -0,0 +1,9 @@
+//DIAGNOSTIC_TEST:SIMPLE:-E
+
+__SLANG_COMPILER__
+
+__HLSL_VERSION
+
+__SLANG__
+
+__HLSL__ \ No newline at end of file