Skip to content

Commit 133d705

Browse files
Set the HLSL supported compiler version to 2018 (#6502)
Co-authored-by: Jay Kwak <82421531+jkwak-work@users.noreply.github.com>
1 parent 5d6578b commit 133d705

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
@@ -2365,7 +2365,7 @@ Dictionary<String, String> TranslationUnitRequest::getCombinedPreprocessorDefini
23652365
// variables.
23662366
{
23672367
// Used to identify level of HLSL language compatibility
2368-
combinedPreprocessorDefinitions.addIfNotExists("__HLSL_VERSION", "2020");
2368+
combinedPreprocessorDefinitions.addIfNotExists("__HLSL_VERSION", "2018");
23692369

23702370
// Indicates this is being compiled by the slang *compiler*
23712371
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)