From e44479c88806a711f6d5f821a4acff030f9a558b Mon Sep 17 00:00:00 2001 From: Jay Kwak <82421531+jkwak-work@users.noreply.github.com> Date: Wed, 2 Apr 2025 05:08:32 -0700 Subject: Enable "-HV 2021" option for DXC (#6445) * Enable "-HV 2021" option for DXC --- source/compiler-core/slang-dxc-compiler.cpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'source') 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 dxcResultBlob = nullptr; -- cgit v1.2.3