summaryrefslogtreecommitdiffstats
path: root/source/compiler-core
diff options
context:
space:
mode:
authorJay Kwak <82421531+jkwak-work@users.noreply.github.com>2025-04-02 05:08:32 -0700
committerGitHub <noreply@github.com>2025-04-02 12:08:32 +0000
commite44479c88806a711f6d5f821a4acff030f9a558b (patch)
tree3156ca08d72347963921c512bec3b071ad4beabd /source/compiler-core
parent5c111ebef679c994047df95bbdf90181ccb2d067 (diff)
Enable "-HV 2021" option for DXC (#6445)
* Enable "-HV 2021" option for DXC
Diffstat (limited to 'source/compiler-core')
-rw-r--r--source/compiler-core/slang-dxc-compiler.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/source/compiler-core/slang-dxc-compiler.cpp b/source/compiler-core/slang-dxc-compiler.cpp
index 2539826ea..065ee4145 100644
--- a/source/compiler-core/slang-dxc-compiler.cpp
+++ b/source/compiler-core/slang-dxc-compiler.cpp
@@ -594,17 +594,8 @@ SlangResult DXCDownstreamCompiler::compile(const CompileOptions& inOptions, IArt
searchDirectories.searchDirectories.add(asString(includePath));
}
-// TODO(JS):
-// We don't want to enable HLSL2021 on DXC by default even if it's available because it has
-// changes that break things. Such as with operator ?:. So for now we disable.
-#if 0
- // TODO(JS): Enable in a better way perhaps?
{
- // Strictly speaking the HLSL2021 was available in 1.6.2112, in preview
- // We enable on 1.7.2207 as that is the first official version, but
- // since we may not be able to get the patch version, we'll just assume any version
- // over 1.7 has can support the feature.
-
+ // Specify -HV 2021 when using a DXC version that supports the newer language model.
const SemanticVersion firstHlsl2021Version(1, 7);
if (m_desc.version >= firstHlsl2021Version)
@@ -613,7 +604,6 @@ SlangResult DXCDownstreamCompiler::compile(const CompileOptions& inOptions, IArt
args.add(L"2021");
}
}
-#endif
String sourcePath;
ComPtr<IDxcBlob> dxcResultBlob = nullptr;