Require validator ver 1.7 for link without version (#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 #5378
This commit is contained in:
Greg Roth 2023-08-31 11:49:31 -06:00 коммит произвёл GitHub
Родитель 5a8812a5d0
Коммит 96fcc60ff6
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -934,7 +934,8 @@ TEST_F(LinkerTest, RunLinkWithTempReg) {
CComPtr<IDxcBlob> pTempRegLib; CComPtr<IDxcBlob> pTempRegLib;
AssembleLib(L"..\\HLSLFileCheck\\dxil\\linker\\TempReg.ll", &pTempRegLib); AssembleLib(L"..\\HLSLFileCheck\\dxil\\linker\\TempReg.ll", &pTempRegLib);
CComPtr<IDxcBlob> pEntryLib; 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; CComPtr<IDxcLinker> pLinker;
CreateLinker(&pLinker); CreateLinker(&pLinker);
LPCWSTR libName = L"entry"; LPCWSTR libName = L"entry";