Skip to content

Commit d0e2d75

Browse files
bharadwajyBharadwaj Yadavalli
authored andcommitted
Restore support for target profile lib_6_x
1 parent 01c742b commit d0e2d75

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

clang/lib/Driver/ToolChains/HLSL.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,11 @@ std::optional<std::string> tryParseProfile(StringRef Profile) {
135135
SubArch = llvm::Triple::DXILSubArch_v1_7;
136136
break;
137137
case 8:
138+
case OfflineLibMinor:
139+
// Always consider minor version x as the latest supported minor version
138140
SubArch = llvm::Triple::DXILSubArch_v1_8;
139141
break;
140-
default :
142+
default:
141143
// No DXIL Version corresponding to specified Shader Model version found
142144
return std::nullopt;
143145
}

clang/unittests/Driver/DXCModeTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ TEST(DxcModeTest, TargetProfileValidation) {
8686
InMemoryFileSystem, Diags);
8787
validateTargetProfile("-Tas_6_7", "dxilv1.7--shadermodel6.7-amplification",
8888
InMemoryFileSystem, Diags);
89-
validateTargetProfile("-Tlib_6_8", "dxilv1.8--shadermodel6.8-library",
89+
validateTargetProfile("-Tlib_6_x", "dxilv1.8--shadermodel6.15-library",
9090
InMemoryFileSystem, Diags);
9191

9292
// Invalid tests.

0 commit comments

Comments
 (0)