Skip to content

Commit 96fcc60

Browse files
author
Greg Roth
authored
Require validator ver 1.7 for link without version (microsoft#5629)
The container builder determines whether to include the version in the compiled shader library depending on the validator version. If the version is below 1.8, it won't include it and any linking is allowed. If it is 1.8 or above, the version will prevent linking with a non-versioned compile. RunLinkWithTempReg assembled one library shader and compiled another. As such, one had a version and the other didn't. By forcing the compile to use an earlier validator version, the link is again allowed Followup to microsoft#5378
1 parent 5a8812a commit 96fcc60

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/clang/unittests/HLSL/LinkerTest.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -934,7 +934,8 @@ TEST_F(LinkerTest, RunLinkWithTempReg) {
934934
CComPtr<IDxcBlob> pTempRegLib;
935935
AssembleLib(L"..\\HLSLFileCheck\\dxil\\linker\\TempReg.ll", &pTempRegLib);
936936
CComPtr<IDxcBlob> pEntryLib;
937-
CompileLib(L"..\\HLSLFileCheck\\dxil\\linker\\use-TempReg.hlsl", &pEntryLib, {}, L"lib_6_3");
937+
CompileLib(L"..\\HLSLFileCheck\\dxil\\linker\\use-TempReg.hlsl", &pEntryLib,
938+
{L"-validator-version", L"1.7"}, L"lib_6_3");
938939
CComPtr<IDxcLinker> pLinker;
939940
CreateLinker(&pLinker);
940941
LPCWSTR libName = L"entry";

0 commit comments

Comments
 (0)