Skip to content

Commit d57b580

Browse files
committed
Set the HLSL supported compiler version to 2018
1 parent 6f56b47 commit d57b580

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

source/slang/slang.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2364,7 +2364,7 @@ Dictionary<String, String> TranslationUnitRequest::getCombinedPreprocessorDefini
23642364
// variables.
23652365
{
23662366
// Used to identify level of HLSL language compatibility
2367-
combinedPreprocessorDefinitions.addIfNotExists("__HLSL_VERSION", "2020");
2367+
combinedPreprocessorDefinitions.addIfNotExists("__HLSL_VERSION", "2018");
23682368

23692369
// Indicates this is being compiled by the slang *compiler*
23702370
combinedPreprocessorDefinitions.addIfNotExists("__SLANG_COMPILER__", "1");

tests/preprocessor/simple-pre-defined.hlsl.expected

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ result code = 0
22
standard error = {
33
}
44
standard output = {
5-
1 2020 0 1
5+
1 2018 0 1
66
}

tests/preprocessor/simple-pre-defined.slang.expected

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ result code = 0
22
standard error = {
33
}
44
standard output = {
5-
1 2020 1 0
5+
1 2018 1 0
66
}

0 commit comments

Comments
 (0)