summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony (Atanas) Zlatinski <tzlatinski@nvidia.com>2025-03-11 20:46:43 -0500
committerGitHub <noreply@github.com>2025-03-11 20:46:43 -0500
commit133d705dcaa69f10f7a713605d5080405e49875c (patch)
treeac375cfab81192d9d37f241c63117d926021468a
parent5d6578b9d58d7ad46503d9124cccf8a68ecd5902 (diff)
Set the HLSL supported compiler version to 2018 (#6502)
Co-authored-by: Jay Kwak <82421531+jkwak-work@users.noreply.github.com>
-rw-r--r--source/slang/slang.cpp2
-rw-r--r--tests/preprocessor/simple-pre-defined.hlsl.expected2
-rw-r--r--tests/preprocessor/simple-pre-defined.slang.expected2
3 files changed, 3 insertions, 3 deletions
diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp
index a23342458..8dfaf115e 100644
--- a/source/slang/slang.cpp
+++ b/source/slang/slang.cpp
@@ -2365,7 +2365,7 @@ Dictionary<String, String> TranslationUnitRequest::getCombinedPreprocessorDefini
// variables.
{
// Used to identify level of HLSL language compatibility
- combinedPreprocessorDefinitions.addIfNotExists("__HLSL_VERSION", "2020");
+ combinedPreprocessorDefinitions.addIfNotExists("__HLSL_VERSION", "2018");
// Indicates this is being compiled by the slang *compiler*
combinedPreprocessorDefinitions.addIfNotExists("__SLANG_COMPILER__", "1");
diff --git a/tests/preprocessor/simple-pre-defined.hlsl.expected b/tests/preprocessor/simple-pre-defined.hlsl.expected
index 98911f3c7..6634c9cd6 100644
--- a/tests/preprocessor/simple-pre-defined.hlsl.expected
+++ b/tests/preprocessor/simple-pre-defined.hlsl.expected
@@ -2,5 +2,5 @@ result code = 0
standard error = {
}
standard output = {
-1 2020 0 1
+1 2018 0 1
}
diff --git a/tests/preprocessor/simple-pre-defined.slang.expected b/tests/preprocessor/simple-pre-defined.slang.expected
index 4b5184e74..5c6991e41 100644
--- a/tests/preprocessor/simple-pre-defined.slang.expected
+++ b/tests/preprocessor/simple-pre-defined.slang.expected
@@ -2,5 +2,5 @@ result code = 0
standard error = {
}
standard output = {
-1 2020 1 0
+1 2018 1 0
}