summaryrefslogtreecommitdiff
path: root/lib/mesa/.gitlab-ci/windows
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mesa/.gitlab-ci/windows')
-rw-r--r--lib/mesa/.gitlab-ci/windows/Dockerfile_build13
-rw-r--r--lib/mesa/.gitlab-ci/windows/Dockerfile_test7
-rw-r--r--lib/mesa/.gitlab-ci/windows/deqp_runner_run.ps131
-rw-r--r--lib/mesa/.gitlab-ci/windows/mesa_build.ps154
-rw-r--r--lib/mesa/.gitlab-ci/windows/mesa_container.ps14
-rw-r--r--lib/mesa/.gitlab-ci/windows/mesa_deps_build.ps1146
-rw-r--r--lib/mesa/.gitlab-ci/windows/mesa_deps_test.ps1124
-rw-r--r--lib/mesa/.gitlab-ci/windows/piglit_run.ps12
-rw-r--r--lib/mesa/.gitlab-ci/windows/spirv2dxil_check.ps154
-rw-r--r--lib/mesa/.gitlab-ci/windows/spirv2dxil_run.ps116
10 files changed, 444 insertions, 7 deletions
diff --git a/lib/mesa/.gitlab-ci/windows/Dockerfile_build b/lib/mesa/.gitlab-ci/windows/Dockerfile_build
new file mode 100644
index 000000000..f94050424
--- /dev/null
+++ b/lib/mesa/.gitlab-ci/windows/Dockerfile_build
@@ -0,0 +1,13 @@
+# escape=`
+
+FROM mcr.microsoft.com/windows:1809
+
+# Make sure any failure in PowerShell scripts is fatal
+SHELL ["powershell", "-ExecutionPolicy", "RemoteSigned", "-Command", "$ErrorActionPreference = 'Stop';"]
+ENV ErrorActionPreference='Stop'
+
+COPY mesa_deps_vs2019.ps1 C:\
+RUN C:\mesa_deps_vs2019.ps1
+
+COPY mesa_deps_build.ps1 C:\
+RUN C:\mesa_deps_build.ps1
diff --git a/lib/mesa/.gitlab-ci/windows/Dockerfile_test b/lib/mesa/.gitlab-ci/windows/Dockerfile_test
new file mode 100644
index 000000000..106e49335
--- /dev/null
+++ b/lib/mesa/.gitlab-ci/windows/Dockerfile_test
@@ -0,0 +1,7 @@
+# escape=`
+
+ARG base_image
+FROM ${base_image}
+
+COPY mesa_deps_test.ps1 C:\
+RUN C:\mesa_deps_test.ps1
diff --git a/lib/mesa/.gitlab-ci/windows/deqp_runner_run.ps1 b/lib/mesa/.gitlab-ci/windows/deqp_runner_run.ps1
new file mode 100644
index 000000000..571836fa4
--- /dev/null
+++ b/lib/mesa/.gitlab-ci/windows/deqp_runner_run.ps1
@@ -0,0 +1,31 @@
+$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\"
+$hkey_name = Join-Path -Path $pwd -ChildPath "_install\share\vulkan\icd.d\dzn_icd.x86_64.json"
+New-Item -Path $hkey_path -force
+New-ItemProperty -Path $hkey_path -Name $hkey_name -Value 0 -PropertyType DWORD
+
+$results = New-Item -ItemType Directory results
+$deqp_options = @("--deqp-surface-width", 256, "--deqp-surface-height", 256, "--deqp-surface-type", "pbuffer", "--deqp-gl-config-name", "rgba8888d24s8ms0", "--deqp-visibility", "hidden")
+$deqp_module = "C:\deqp\external\vulkancts\modules\vulkan\deqp-vk.exe"
+$caselist = "C:\deqp\mustpass\vk-master.txt"
+$baseline = ".\_install\warp-fails.txt"
+$includes = @("-t", "dEQP-VK.api.*", "-t", "dEQP-VK.info.*", "-t", "dEQP-VK.draw.*", "-t", "dEQP-VK.query_pool.*", "-t", "dEQP-VK.memory.*")
+
+$env:DZN_DEBUG = "warp"
+deqp-runner run --deqp $($deqp_module) --output $($results) --caselist $($caselist) --baseline $($baseline) $($includes) --testlog-to-xml C:\deqp\executor\testlog-to-xml.exe --jobs 4 -- $($deqp_options)
+$deqpstatus = $?
+
+$template = "See https://$($env:CI_PROJECT_ROOT_NAMESPACE).pages.freedesktop.org/-/$($env:CI_PROJECT_NAME)/-/jobs/$($env:CI_JOB_ID)/artifacts/results/{{testcase}}.xml"
+deqp-runner junit --testsuite dEQP --results "$($results)/failures.csv" --output "$($results)/junit.xml" --limit 50 --template $template
+
+if (!$deqpstatus) {
+ Exit 1
+}
diff --git a/lib/mesa/.gitlab-ci/windows/mesa_build.ps1 b/lib/mesa/.gitlab-ci/windows/mesa_build.ps1
index 42794c6ec..e4427a7c2 100644
--- a/lib/mesa/.gitlab-ci/windows/mesa_build.ps1
+++ b/lib/mesa/.gitlab-ci/windows/mesa_build.ps1
@@ -6,10 +6,48 @@ $env:PYTHONUTF8=1
Get-Date
Write-Host "Compiling Mesa"
-$builddir = New-Item -ItemType Directory -Name "_build"
-$installdir = New-Item -ItemType Directory -Name "_install"
-Push-Location $builddir.FullName
-cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=amd64 && meson --default-library=shared -Dzlib:default_library=static --buildtype=release -Db_ndebug=false -Dc_std=c17 -Dcpp_std=vc++latest -Db_vscrt=mt --cmake-prefix-path=`"C:\llvm-10`" --pkg-config-path=`"C:\llvm-10\lib\pkgconfig;C:\llvm-10\share\pkgconfig;C:\spirv-tools\lib\pkgconfig`" --prefix=`"$installdir`" -Dllvm=enabled -Dshared-llvm=disabled -Dvulkan-drivers=swrast,amd -Dgallium-drivers=swrast,d3d12,zink -Dshared-glapi=enabled -Dgles2=enabled -Dmicrosoft-clc=enabled -Dstatic-libclc=all -Dspirv-to-dxil=true -Dbuild-tests=true -Dwerror=true -Dwarning_level=2 -Dzlib:warning_level=1 -Dlibelf:warning_level=1 && ninja -j32 install && meson test --num-processes 32"
+$builddir = New-Item -Force -ItemType Directory -Name "_build"
+$installdir = New-Item -Force -ItemType Directory -Name "_install"
+$builddir=$builddir.FullName
+$installdir=$installdir.FullName
+$sourcedir=$PWD
+
+Remove-Item -Recurse -Force $builddir
+Remove-Item -Recurse -Force $installdir
+New-Item -ItemType Directory -Path $builddir
+New-Item -ItemType Directory -Path $installdir
+
+Write-Output builddir:$builddir
+Write-Output installdir:$installdir
+Write-Output sourcedir:$sourcedir
+
+$installPath=& "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -version 16.0 -property installationpath
+Write-Output "vswhere.exe installPath: $installPath"
+$installPath="C:\BuildTools"
+Write-Output "Final installPath: $installPath"
+Import-Module (Join-Path $installPath "Common7\Tools\Microsoft.VisualStudio.DevShell.dll")
+Enter-VsDevShell -VsInstallPath $installPath -SkipAutomaticLocation -DevCmdArguments '-arch=x64 -no_logo -host_arch=amd64'
+
+Push-Location $builddir
+
+meson --default-library=shared -Dzlib:default_library=static --buildtype=release -Db_ndebug=false `
+-Db_vscrt=mt --cmake-prefix-path="C:\llvm-10" `
+--pkg-config-path="C:\llvm-10\lib\pkgconfig;C:\llvm-10\share\pkgconfig;C:\spirv-tools\lib\pkgconfig" `
+--prefix="$installdir" `
+-Dllvm=enabled -Dshared-llvm=disabled `
+"-Dvulkan-drivers=swrast,amd,microsoft-experimental" "-Dgallium-drivers=swrast,d3d12,zink" `
+-Dshared-glapi=enabled -Dgles2=enabled -Dmicrosoft-clc=enabled -Dstatic-libclc=all -Dspirv-to-dxil=true `
+-Dbuild-tests=true -Dwerror=true -Dwarning_level=2 -Dzlib:warning_level=1 -Dlibelf:warning_level=1 `
+$sourcedir
+
+if ($?) {
+ ninja install -j32
+}
+
+if ($?) {
+ meson test --num-processes 32
+}
+
$buildstatus = $?
Pop-Location
@@ -21,4 +59,10 @@ if (!$buildstatus) {
}
Copy-Item ".\.gitlab-ci\windows\piglit_run.ps1" -Destination $installdir
-Copy-Item ".\.gitlab-ci\windows\quick_gl.txt" -Destination $installdir
+
+Copy-Item ".\.gitlab-ci\windows\spirv2dxil_check.ps1" -Destination $installdir
+Copy-Item ".\.gitlab-ci\windows\spirv2dxil_run.ps1" -Destination $installdir
+
+Copy-Item ".\.gitlab-ci\windows\deqp_runner_run.ps1" -Destination $installdir
+
+Get-ChildItem -Recurse -Filter "ci" | Get-ChildItem -Filter "*.txt" | Copy-Item -Destination $installdir
diff --git a/lib/mesa/.gitlab-ci/windows/mesa_container.ps1 b/lib/mesa/.gitlab-ci/windows/mesa_container.ps1
index 7a2f6c237..cbb9e2235 100644
--- a/lib/mesa/.gitlab-ci/windows/mesa_container.ps1
+++ b/lib/mesa/.gitlab-ci/windows/mesa_container.ps1
@@ -6,6 +6,8 @@ $registry_username = $args[1]
$registry_password = $args[2]
$registry_user_image = $args[3]
$registry_central_image = $args[4]
+$build_dockerfile = $args[5]
+$registry_base_image = $args[6]
Set-Location -Path ".\.gitlab-ci\windows"
@@ -39,7 +41,7 @@ if ($?) {
}
Write-Host "No image found at $registry_user_image or $registry_central_image; rebuilding"
-docker --config "windows-docker.conf" build --no-cache -t "$registry_user_image" .
+docker --config "windows-docker.conf" build --no-cache -t "$registry_user_image" -f "$build_dockerfile" --build-arg base_image="$registry_base_image" .
if (!$?) {
Write-Host "Container build failed"
docker --config "windows-docker.conf" logout "$registry_uri"
diff --git a/lib/mesa/.gitlab-ci/windows/mesa_deps_build.ps1 b/lib/mesa/.gitlab-ci/windows/mesa_deps_build.ps1
new file mode 100644
index 000000000..a771ca254
--- /dev/null
+++ b/lib/mesa/.gitlab-ci/windows/mesa_deps_build.ps1
@@ -0,0 +1,146 @@
+# Download new TLS certs from Windows Update
+Get-Date
+Write-Host "Updating TLS certificate store"
+$certdir = (New-Item -ItemType Directory -Name "_tlscerts")
+certutil -syncwithWU "$certdir"
+Foreach ($file in (Get-ChildItem -Path "$certdir\*" -Include "*.crt")) {
+ Import-Certificate -FilePath $file -CertStoreLocation Cert:\LocalMachine\Root
+}
+Remove-Item -Recurse -Path $certdir
+
+
+Get-Date
+Write-Host "Installing Chocolatey"
+Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
+Import-Module "$env:ProgramData\chocolatey\helpers\chocolateyProfile.psm1"
+Update-SessionEnvironment
+Write-Host "Installing Chocolatey packages"
+
+# Chocolatey tries to download winflexbison from SourceForge, which is not super reliable, and has no retry
+# loop of its own - so we give it a helping hand here
+For ($i = 0; $i -lt 5; $i++) {
+ choco install -y python3 --params="/InstallDir:C:\python3"
+ $python_install = $?
+ choco install --allow-empty-checksums -y cmake git git-lfs ninja pkgconfiglite winflexbison vulkan-sdk --installargs "ADD_CMAKE_TO_PATH=System"
+ $other_install = $?
+ $choco_installed = $other_install -and $python_install
+ if ($choco_installed) {
+ Break
+ }
+}
+
+if (!$choco_installed) {
+ Write-Host "Couldn't install dependencies from Chocolatey"
+ Exit 1
+}
+
+# Add Chocolatey's native install path
+Update-SessionEnvironment
+# Python and CMake add themselves to the system environment path, which doesn't get refreshed
+# until we start a new shell
+$env:PATH = "C:\python3;C:\python3\scripts;C:\Program Files\CMake\bin;$env:PATH"
+
+Start-Process -NoNewWindow -Wait git -ArgumentList 'config --global core.autocrlf false'
+
+Get-Date
+Write-Host "Installing Meson, Mako and numpy"
+pip3 install meson mako numpy
+if (!$?) {
+ Write-Host "Failed to install dependencies from pip"
+ Exit 1
+}
+
+# we want more secure TLS 1.2 for most things, but it breaks SourceForge
+# downloads so must be done after Chocolatey use
+[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 -bor [Net.SecurityProtocolType]::Tls13;
+
+Get-Date
+Write-Host "Cloning LLVM release/12.x"
+git clone -b release/12.x --depth=1 https://github.com/llvm/llvm-project llvm-project
+if (!$?) {
+ Write-Host "Failed to clone LLVM repository"
+ Exit 1
+}
+
+# ideally we want to use a tag here insted of a sha,
+# but as of today, SPIRV-LLVM-Translator doesn't have
+# a tag matching LLVM 12.0.0
+Get-Date
+Write-Host "Cloning SPIRV-LLVM-Translator"
+git clone https://github.com/KhronosGroup/SPIRV-LLVM-Translator llvm-project/llvm/projects/SPIRV-LLVM-Translator
+if (!$?) {
+ Write-Host "Failed to clone SPIRV-LLVM-Translator repository"
+ Exit 1
+}
+Push-Location llvm-project/llvm/projects/SPIRV-LLVM-Translator
+git checkout 5b641633b3bcc3251a52260eee11db13a79d7258
+Pop-Location
+
+Get-Date
+# slightly convoluted syntax but avoids the CWD being under the PS filesystem meta-path
+$llvm_build = New-Item -ItemType Directory -Path ".\llvm-project" -Name "build"
+Push-Location -Path $llvm_build.FullName
+Write-Host "Compiling LLVM and Clang"
+cmd.exe /C 'C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=amd64 && cmake ../llvm -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_USE_CRT_RELEASE=MT -DCMAKE_INSTALL_PREFIX="C:\llvm-10" -DLLVM_ENABLE_PROJECTS="clang;lld" -DLLVM_TARGETS_TO_BUILD=AMDGPU;X86 -DLLVM_OPTIMIZED_TABLEGEN=TRUE -DLLVM_ENABLE_ASSERTIONS=TRUE -DLLVM_INCLUDE_UTILS=OFF -DLLVM_INCLUDE_RUNTIMES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_GO_TESTS=OFF -DLLVM_INCLUDE_BENCHMARKS=OFF -DLLVM_BUILD_LLVM_C_DYLIB=OFF -DLLVM_ENABLE_DIA_SDK=OFF -DCLANG_BUILD_TOOLS=ON -DLLVM_SPIRV_INCLUDE_TESTS=OFF && ninja -j32 install'
+$buildstatus = $?
+Pop-Location
+if (!$buildstatus) {
+ Write-Host "Failed to compile LLVM"
+ Exit 1
+}
+
+Get-Date
+$libclc_build = New-Item -ItemType Directory -Path ".\llvm-project" -Name "build-libclc"
+Push-Location -Path $libclc_build.FullName
+Write-Host "Compiling libclc"
+# libclc can only be built with Ninja, because CMake's VS backend doesn't know how to compile new language types
+cmd.exe /C 'C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=amd64 && cmake ../libclc -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-m64" -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DCMAKE_INSTALL_PREFIX="C:\llvm-10" -DLIBCLC_TARGETS_TO_BUILD="spirv-mesa3d-;spirv64-mesa3d-" && ninja -j32 install'
+$buildstatus = $?
+Pop-Location
+Remove-Item -Recurse -Path $libclc_build
+if (!$buildstatus) {
+ Write-Host "Failed to compile libclc"
+ Exit 1
+}
+Remove-Item -Recurse -Path $llvm_build
+
+Get-Date
+Write-Host "Cloning SPIRV-Tools"
+git clone https://github.com/KhronosGroup/SPIRV-Tools
+if (!$?) {
+ Write-Host "Failed to clone SPIRV-Tools repository"
+ Exit 1
+}
+git clone https://github.com/KhronosGroup/SPIRV-Headers SPIRV-Tools/external/SPIRV-Headers
+if (!$?) {
+ Write-Host "Failed to clone SPIRV-Headers repository"
+ Exit 1
+}
+Write-Host "Building SPIRV-Tools"
+$spv_build = New-Item -ItemType Directory -Path ".\SPIRV-Tools" -Name "build"
+Push-Location -Path $spv_build.FullName
+# SPIRV-Tools doesn't use multi-threaded MSVCRT, but we need it to
+cmd.exe /C 'C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=amd64 && cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DCMAKE_INSTALL_PREFIX="C:\spirv-tools" && ninja -j32 install'
+$buildstatus = $?
+Pop-Location
+Remove-Item -Recurse -Path $spv_build
+if (!$buildstatus) {
+ Write-Host "Failed to compile SPIRV-Tools"
+ Exit 1
+}
+
+# See https://gitlab.freedesktop.org/mesa/mesa/-/issues/3855
+# Until that's resolved, we need the vulkan-runtime as a build dependency to be able to run any unit tests on GL
+Get-Date
+Write-Host "Downloading Vulkan-Runtime"
+Invoke-WebRequest -Uri 'https://sdk.lunarg.com/sdk/download/latest/windows/vulkan-runtime.exe' -OutFile 'C:\vulkan-runtime.exe' | Out-Null
+Write-Host "Installing Vulkan-Runtime"
+Start-Process -NoNewWindow -Wait C:\vulkan-runtime.exe -ArgumentList '/S'
+if (!$?) {
+ Write-Host "Failed to install Vulkan-Runtime"
+ Exit 1
+}
+Remove-Item C:\vulkan-runtime.exe -Force
+
+Get-Date
+Write-Host "Complete"
diff --git a/lib/mesa/.gitlab-ci/windows/mesa_deps_test.ps1 b/lib/mesa/.gitlab-ci/windows/mesa_deps_test.ps1
new file mode 100644
index 000000000..0600be893
--- /dev/null
+++ b/lib/mesa/.gitlab-ci/windows/mesa_deps_test.ps1
@@ -0,0 +1,124 @@
+Get-Date
+Write-Host "Downloading Freeglut"
+
+$freeglut_zip = 'freeglut-MSVC.zip'
+$freeglut_url = "https://www.transmissionzero.co.uk/files/software/development/GLUT/$freeglut_zip"
+
+For ($i = 0; $i -lt 5; $i++) {
+ Invoke-WebRequest -Uri $freeglut_url -OutFile $freeglut_zip
+ $freeglut_downloaded = $?
+ if ($freeglut_downloaded) {
+ Break
+ }
+}
+
+if (!$freeglut_downloaded) {
+ Write-Host "Failed to download Freeglut"
+ Exit 1
+}
+
+Get-Date
+Write-Host "Installing Freeglut"
+Expand-Archive $freeglut_zip -DestinationPath C:\
+if (!$?) {
+ Write-Host "Failed to install Freeglut"
+ Exit 1
+}
+
+Get-Date
+Write-Host "Downloading glext.h"
+New-Item -ItemType Directory -Path ".\glext" -Name "GL"
+$ProgressPreference = "SilentlyContinue"
+Invoke-WebRequest -Uri 'https://www.khronos.org/registry/OpenGL/api/GL/glext.h' -OutFile '.\glext\GL\glext.h' | Out-Null
+
+Get-Date
+Write-Host "Cloning Piglit"
+git clone --no-progress --single-branch --no-checkout https://gitlab.freedesktop.org/mesa/piglit.git 'C:\src\piglit'
+if (!$?) {
+ Write-Host "Failed to clone Piglit repository"
+ Exit 1
+}
+Push-Location -Path C:\src\piglit
+git checkout f7f2a6c2275cae023a27b6cc81be3dda8c99492d
+Pop-Location
+
+Get-Date
+$piglit_build = New-Item -ItemType Directory -Path "C:\src\piglit" -Name "build"
+Push-Location -Path $piglit_build.FullName
+Write-Host "Compiling Piglit"
+cmd.exe /C 'C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=amd64 && cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="C:\Piglit" -DGLUT_INCLUDE_DIR=C:\freeglut\include -DGLUT_glut_LIBRARY_RELEASE=C:\freeglut\lib\x64\freeglut.lib -DGLEXT_INCLUDE_DIR=.\glext && ninja -j32'
+$buildstatus = $?
+ninja -j32 install | Out-Null
+$installstatus = $?
+Pop-Location
+Remove-Item -Recurse -Path $piglit_build
+if (!$buildstatus -Or !$installstatus) {
+ Write-Host "Failed to compile or install Piglit"
+ Exit 1
+}
+
+Copy-Item -Path C:\freeglut\bin\x64\freeglut.dll -Destination C:\Piglit\lib\piglit\bin\freeglut.dll
+
+Get-Date
+Write-Host "Cloning spirv-samples"
+git clone --no-progress --single-branch --no-checkout https://github.com/dneto0/spirv-samples.git C:\spirv-samples\
+Push-Location -Path C:\spirv-samples\
+git checkout 7ac0ad5a7fe0ec884faba1dc2916028d0268eeef
+Pop-Location
+
+Get-Date
+Write-Host "Cloning Vulkan and GL Conformance Tests"
+$deqp_source = "C:\src\VK-GL-CTS\"
+git clone --no-progress --single-branch https://github.com/lfrb/VK-GL-CTS.git -b windows-flush $deqp_source
+if (!$?) {
+ Write-Host "Failed to clone deqp repository"
+ Exit 1
+}
+
+Push-Location -Path $deqp_source
+# --insecure is due to SSL cert failures hitting sourceforge for zlib and
+# libpng (sigh). The archives get their checksums checked anyway, and git
+# always goes through ssh or https.
+py .\external\fetch_sources.py --insecure
+Pop-Location
+
+Get-Date
+$deqp_build = New-Item -ItemType Directory -Path "C:\deqp"
+Push-Location -Path $deqp_build.FullName
+Write-Host "Compiling deqp"
+cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=amd64 && cmake -S $($deqp_source) -B . -GNinja -DCMAKE_BUILD_TYPE=Release -DDEQP_TARGET=default && ninja -j32"
+$buildstatus = $?
+Pop-Location
+if (!$buildstatus -Or !$installstatus) {
+ Write-Host "Failed to compile or install deqp"
+ Exit 1
+}
+
+# Copy test result templates
+Copy-Item -Path "$($deqp_source)\doc\testlog-stylesheet\testlog.css" -Destination $deqp_build
+Copy-Item -Path "$($deqp_source)\doc\testlog-stylesheet\testlog.xsl" -Destination $deqp_build
+
+# Copy Vulkan must-pass list
+$deqp_mustpass = New-Item -ItemType Directory -Path $deqp_build -Name "mustpass"
+$root_mustpass = Join-Path -Path $deqp_source -ChildPath "external\vulkancts\mustpass\master"
+$files = Get-Content "$($root_mustpass)\vk-default.txt"
+foreach($file in $files) {
+ Get-Content "$($root_mustpass)\$($file)" | Add-Content -Path "$($deqp_mustpass)\vk-master.txt"
+}
+Remove-Item -Force -Recurse $deqp_source
+
+Get-Date
+$url = 'https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe';
+Write-Host ('Downloading {0} ...' -f $url);
+Invoke-WebRequest -Uri $url -OutFile 'rustup-init.exe';
+Write-Host "Installing rust toolchain"
+C:\rustup-init.exe -y;
+Remove-Item C:\rustup-init.exe;
+
+Get-Date
+Write-Host "Installing deqp-runner"
+$env:Path += ";$($env:USERPROFILE)\.cargo\bin"
+cargo install --git https://gitlab.freedesktop.org/anholt/deqp-runner.git
+
+Get-Date
+Write-Host "Complete"
diff --git a/lib/mesa/.gitlab-ci/windows/piglit_run.ps1 b/lib/mesa/.gitlab-ci/windows/piglit_run.ps1
index 3414fc2dc..2205b7ba0 100644
--- a/lib/mesa/.gitlab-ci/windows/piglit_run.ps1
+++ b/lib/mesa/.gitlab-ci/windows/piglit_run.ps1
@@ -9,7 +9,7 @@ cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=amd6
py -3 C:\Piglit\bin\piglit.py summary console .\results | Select -SkipLast 1 | Select-String -NotMatch -Pattern ': pass' | Set-Content -Path .\result.txt
-$reference = Get-Content ".\_install\$env:PIGLIT_PROFILE.txt"
+$reference = Get-Content ".\_install\$env:PIGLIT_RESULTS.txt"
$result = Get-Content .\result.txt
if (-Not ($reference -And $result)) {
Exit 1
diff --git a/lib/mesa/.gitlab-ci/windows/spirv2dxil_check.ps1 b/lib/mesa/.gitlab-ci/windows/spirv2dxil_check.ps1
new file mode 100644
index 000000000..bfa9fdc3d
--- /dev/null
+++ b/lib/mesa/.gitlab-ci/windows/spirv2dxil_check.ps1
@@ -0,0 +1,54 @@
+# 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
+foreach ($spvasm in $spvasm_files) {
+ $test_name = "Test:$($spvasm.Name):"
+ $spvfile = ($spvasm -replace '\.spvasm$', '.spv')
+ $content = Get-Content $spvasm
+ $spv_version = "1.0"
+ if ($content | Where-Object { $_ -match 'Version:\s(\d+\.\d+)' }) {
+ $spv_version = $Matches[1]
+ }
+
+ $as_output = C:\spirv-tools\bin\spirv-as.exe --target-env spv$spv_version --preserve-numeric-ids -o $spvfile $spvasm 2>&1 | % { if ($_ -is [System.Management.Automation.ErrorRecord]) { $_.Exception.Message } else { $_ } } | Out-String
+ if ($LASTEXITCODE -ne 0) {
+ Write-Output "$test_name Skip: Unable to assemble shader"
+ Write-Output "$as_output`n"
+ continue
+ }
+
+ $entry_points = $content | Select-String -Pattern '^OpEntryPoint\s(\w+)[^"]+"(\w+)"' | Select-Object -ExpandProperty Matches -First 1
+ if ($entry_points.Count -eq 0) {
+ Write-Output "$test_name Skip"
+ Write-Output "No OpEntryPoint not found`n"
+ continue
+ }
+
+ foreach ($match in $entry_points) {
+ $exec_mode, $entry_point = $match.Groups[1].Value, $match.Groups[2].Value
+ $subtest = "$test_name$entry_point|${exec_mode}:"
+ $stage = $exec_mode_to_stage[$exec_mode]
+ if ($stage -eq '') {
+ Write-Output "$subtest Fail: Unknown shader type ($exec_mode)"
+ continue
+ }
+
+ $s2d_output = .\_install\bin\spirv2dxil.exe -v -e "$entry_point" -s "$stage" -o NUL $spvfile 2>&1 | ForEach-Object { if ($_ -is [System.Management.Automation.ErrorRecord]) { $_.Exception.Message } else { $_ } } | Out-String
+ if ($LASTEXITCODE -eq 0) {
+ Write-Output "$subtest Pass"
+ }
+ else {
+ Write-Output "$subtest Fail"
+ $sanitized_output = $s2d_output -replace ', file .+, line \d+' -replace ' In file .+:\d+'
+ Write-Output "$sanitized_output`n"
+ }
+ }
+}
diff --git a/lib/mesa/.gitlab-ci/windows/spirv2dxil_run.ps1 b/lib/mesa/.gitlab-ci/windows/spirv2dxil_run.ps1
new file mode 100644
index 000000000..ae6c1c2cd
--- /dev/null
+++ b/lib/mesa/.gitlab-ci/windows/spirv2dxil_run.ps1
@@ -0,0 +1,16 @@
+. .\_install\spirv2dxil_check.ps1 2>&1 | Set-Content -Path .\spirv2dxil_results.txt
+$reference = Get-Content .\_install\spirv2dxil_reference.txt
+$result = Get-Content .\spirv2dxil_results.txt
+if (-Not ($reference -And $result)) {
+ Exit 1
+}
+
+$diff = Compare-Object -ReferenceObject $reference -DifferenceObject $result
+if (-Not $diff) {
+ Exit 0
+}
+
+Write-Host "Unexpected change in results:"
+Write-Output $diff | Format-Table -Property SideIndicator, InputObject -Wrap
+
+Exit 1