Skip to content

Commit

Permalink
Require validator ver 1.7 for link without version (#5629)
Browse files Browse the repository at this point in the history
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 #5378
  • Loading branch information
pow2clk authored Aug 31, 2023
1 parent 5a8812a commit 96fcc60
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/clang/unittests/HLSL/LinkerTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,8 @@ TEST_F(LinkerTest, RunLinkWithTempReg) {
CComPtr<IDxcBlob> pTempRegLib;
AssembleLib(L"..\\HLSLFileCheck\\dxil\\linker\\TempReg.ll", &pTempRegLib);
CComPtr<IDxcBlob> pEntryLib;
CompileLib(L"..\\HLSLFileCheck\\dxil\\linker\\use-TempReg.hlsl", &pEntryLib, {}, L"lib_6_3");
CompileLib(L"..\\HLSLFileCheck\\dxil\\linker\\use-TempReg.hlsl", &pEntryLib,
{L"-validator-version", L"1.7"}, L"lib_6_3");
CComPtr<IDxcLinker> pLinker;
CreateLinker(&pLinker);
LPCWSTR libName = L"entry";
Expand Down

0 comments on commit 96fcc60

Please sign in to comment.