From 9426425bf0cccf0753b0740d839b932540d9a516 Mon Sep 17 00:00:00 2001 From: Jesse Natalie Date: Sat, 27 Aug 2022 18:24:13 -0700 Subject: [PATCH] ci/windows: Get DXIL.dll (and DXCompiler.dll) from GitHub and put it in System32 Reviewed-by: Giancarlo Devich Reviewed-by: Sil Vilerino Part-of: --- .gitlab-ci/windows/deqp_runner_run.ps1 | 7 ------- .gitlab-ci/windows/mesa_deps_test.ps1 | 7 +++++++ .gitlab-ci/windows/piglit_run.ps1 | 3 +-- .gitlab-ci/windows/spirv2dxil_check.ps1 | 8 -------- 4 files changed, 8 insertions(+), 17 deletions(-) diff --git a/.gitlab-ci/windows/deqp_runner_run.ps1 b/.gitlab-ci/windows/deqp_runner_run.ps1 index 190b117..4bf0f61 100644 --- a/.gitlab-ci/windows/deqp_runner_run.ps1 +++ b/.gitlab-ci/windows/deqp_runner_run.ps1 @@ -1,10 +1,3 @@ -$dxil_dll = cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=amd64 -no_logo && where dxil.dll" 2>&1 -if ($dxil_dll -notmatch "dxil.dll$") { - Write-Output "Couldn't get path to dxil.dll" - exit 1 -} -$env:Path = "$(Split-Path $dxil_dll);$env:Path" - # VK_ICD_FILENAMES environment variable is not used when running with # elevated privileges. Add a key to the registry instead. $hkey_path = "HKLM:\SOFTWARE\Khronos\Vulkan\Drivers\" diff --git a/.gitlab-ci/windows/mesa_deps_test.ps1 b/.gitlab-ci/windows/mesa_deps_test.ps1 index 72a21ed..9badef0 100644 --- a/.gitlab-ci/windows/mesa_deps_test.ps1 +++ b/.gitlab-ci/windows/mesa_deps_test.ps1 @@ -163,4 +163,11 @@ Copy-Item 'C:\warp\build\native\amd64\d3d10warp.dll' -Destination $vk_cts_bin Remove-Item -Recurse 'C:\warp' Get-Date +Write-Host "Downloading DirectXShaderCompiler release" +Invoke-WebRequest -Uri https://github.com/microsoft/DirectXShaderCompiler/releases/download/v1.7.2207/dxc_2022_07_18.zip -OutFile 'DXC.zip' +Expand-Archive -Path 'DXC.zip' -DestinationPath 'C:\DXC' +# No more need to get dxil.dll from the VS install +Copy-Item 'C:\DXC\bin\x64\*.dll' -Destination 'C:\Windows\System32' + +Get-Date Write-Host "Complete" diff --git a/.gitlab-ci/windows/piglit_run.ps1 b/.gitlab-ci/windows/piglit_run.ps1 index 2205b7b..7d272c7 100644 --- a/.gitlab-ci/windows/piglit_run.ps1 +++ b/.gitlab-ci/windows/piglit_run.ps1 @@ -4,8 +4,7 @@ Copy-Item -Path _install\bin\opengl32.dll -Destination C:\Piglit\lib\piglit\bin\ Copy-Item -Path _install\bin\libgallium_wgl.dll -Destination C:\Piglit\lib\piglit\bin\libgallium_wgl.dll Copy-Item -Path _install\bin\libglapi.dll -Destination C:\Piglit\lib\piglit\bin\libglapi.dll -# Run this using VsDevCmd.bat to ensure DXIL.dll is in %PATH% -cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=amd64 && py -3 C:\Piglit\bin\piglit.py run `"$env:PIGLIT_PROFILE`" $env:PIGLIT_OPTIONS $env:PIGLIT_TESTS .\results" +cmd.exe /C "py -3 C:\Piglit\bin\piglit.py run --timeout 240 `"$env:PIGLIT_PROFILE`" $env:PIGLIT_OPTIONS $env:PIGLIT_TESTS .\results" py -3 C:\Piglit\bin\piglit.py summary console .\results | Select -SkipLast 1 | Select-String -NotMatch -Pattern ': pass' | Set-Content -Path .\result.txt diff --git a/.gitlab-ci/windows/spirv2dxil_check.ps1 b/.gitlab-ci/windows/spirv2dxil_check.ps1 index 7edf6ac..94735c9 100644 --- a/.gitlab-ci/windows/spirv2dxil_check.ps1 +++ b/.gitlab-ci/windows/spirv2dxil_check.ps1 @@ -1,11 +1,3 @@ -# Ensure that dxil.dll in on the %PATH% -$dxil_dll = cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=amd64 -no_logo && where dxil.dll" 2>&1 -if ($dxil_dll -notmatch "dxil.dll$") { - Write-Output "Couldn't get path to dxil.dll" - exit 1 -} -$env:Path = "$(Split-Path $dxil_dll);$env:Path" - $exec_mode_to_stage = @{ Fragment = "fragment"; Vertex = "vertex"; GLCompute = "compute" } $spvasm_files = (Get-ChildItem C:\spirv-samples\spvasm\*.spvasm) | Sort-Object Name -- 2.7.4