1 Get-Date 2 Write-Host "Downloading Freeglut" 3 4 $freeglut_zip = 'freeglut-MSVC.zip' 5 $freeglut_url = "https://www.transmissionzero.co.uk/files/software/development/GLUT/$freeglut_zip" 6 7 For ($i = 0; $i -lt 5; $i++) { 8 Invoke-WebRequest -Uri $freeglut_url -OutFile $freeglut_zip 9 $freeglut_downloaded = $? 10 if ($freeglut_downloaded) { 11 Break 12 } 13 } 14 15 if (!$freeglut_downloaded) { 16 Write-Host "Failed to download Freeglut" 17 Exit 1 18 } 19 20 Get-Date 21 Write-Host "Installing Freeglut" 22 Expand-Archive $freeglut_zip -DestinationPath C:\ 23 if (!$?) { 24 Write-Host "Failed to install Freeglut" 25 Exit 1 26 } 27 28 $MyPath = $MyInvocation.MyCommand.Path | Split-Path -Parent 29 . "$MyPath\mesa_vs_init.ps1" 30 31 Get-Date 32 Write-Host "Downloading glext.h" 33 New-Item -ItemType Directory -Path ".\glext" -Name "GL" 34 $ProgressPreference = "SilentlyContinue" 35 Invoke-WebRequest -Uri 'https://www.khronos.org/registry/OpenGL/api/GL/glext.h' -OutFile '.\glext\GL\glext.h' | Out-Null 36 37 Get-Date 38 Write-Host "Cloning Piglit" 39 git clone --no-progress --single-branch --no-checkout https://gitlab.freedesktop.org/mesa/piglit.git 'C:\src\piglit' 40 if (!$?) { 41 Write-Host "Failed to clone Piglit repository" 42 Exit 1 43 } 44 Push-Location -Path C:\src\piglit 45 git checkout f7f2a6c2275cae023a27b6cc81be3dda8c99492d 46 Pop-Location 47 48 Get-Date 49 $piglit_build = New-Item -ItemType Directory -Path "C:\src\piglit" -Name "build" 50 Push-Location -Path $piglit_build.FullName 51 Write-Host "Compiling Piglit" 52 cmake .. ` 53 -GNinja ` 54 -DCMAKE_BUILD_TYPE=Release ` 55 -DCMAKE_INSTALL_PREFIX="C:\Piglit" ` 56 -DGLUT_INCLUDE_DIR=C:\freeglut\include ` 57 -DGLUT_glut_LIBRARY_RELEASE=C:\freeglut\lib\x64\freeglut.lib ` 58 -DGLEXT_INCLUDE_DIR=.\glext && ` 59 ninja -j32 60 $buildstatus = $? 61 ninja -j32 install | Out-Null 62 $installstatus = $? 63 Pop-Location 64 Remove-Item -Recurse -Path $piglit_build 65 if (!$buildstatus -Or !$installstatus) { 66 Write-Host "Failed to compile or install Piglit" 67 Exit 1 68 } 69 70 Copy-Item -Path C:\freeglut\bin\x64\freeglut.dll -Destination C:\Piglit\lib\piglit\bin\freeglut.dll 71 72 Get-Date 73 Write-Host "Cloning spirv-samples" 74 git clone --no-progress --single-branch --no-checkout https://github.com/dneto0/spirv-samples.git C:\spirv-samples\ 75 Push-Location -Path C:\spirv-samples\ 76 git checkout 36372636df06a24c4e2de1551beee055db01b91d 77 Pop-Location 78 79 Get-Date 80 Write-Host "Cloning Vulkan and GL Conformance Tests" 81 $deqp_source = "C:\src\VK-GL-CTS\" 82 git clone --no-progress --single-branch https://github.com/lfrb/VK-GL-CTS.git -b windows-flush $deqp_source 83 if (!$?) { 84 Write-Host "Failed to clone deqp repository" 85 Exit 1 86 } 87 88 Push-Location -Path $deqp_source 89 # --insecure is due to SSL cert failures hitting sourceforge for zlib and 90 # libpng (sigh). The archives get their checksums checked anyway, and git 91 # always goes through ssh or https. 92 py .\external\fetch_sources.py --insecure 93 Pop-Location 94 95 Get-Date 96 $deqp_build = New-Item -ItemType Directory -Path "C:\deqp" 97 Push-Location -Path $deqp_build.FullName 98 Write-Host "Compiling deqp" 99 cmake -S $($deqp_source) ` 100 -B . ` 101 -GNinja ` 102 -DCMAKE_BUILD_TYPE=Release ` 103 -DDEQP_TARGET=default && ` 104 ninja -j32 105 $buildstatus = $? 106 Pop-Location 107 if (!$buildstatus -Or !$installstatus) { 108 Write-Host "Failed to compile or install deqp" 109 Exit 1 110 } 111 112 # Copy test result templates 113 Copy-Item -Path "$($deqp_source)\doc\testlog-stylesheet\testlog.css" -Destination $deqp_build 114 Copy-Item -Path "$($deqp_source)\doc\testlog-stylesheet\testlog.xsl" -Destination $deqp_build 115 116 # Copy Vulkan must-pass list 117 $deqp_mustpass = New-Item -ItemType Directory -Path $deqp_build -Name "mustpass" 118 $root_mustpass = Join-Path -Path $deqp_source -ChildPath "external\vulkancts\mustpass\master" 119 $files = Get-Content "$($root_mustpass)\vk-default.txt" 120 foreach($file in $files) { 121 Get-Content "$($root_mustpass)\$($file)" | Add-Content -Path "$($deqp_mustpass)\vk-master.txt" 122 } 123 Remove-Item -Force -Recurse $deqp_source 124 125 Get-Date 126 $url = 'https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe'; 127 Write-Host ('Downloading {0} ...' -f $url); 128 Invoke-WebRequest -Uri $url -OutFile 'rustup-init.exe'; 129 Write-Host "Installing rust toolchain" 130 C:\rustup-init.exe -y; 131 Remove-Item C:\rustup-init.exe; 132 133 Get-Date 134 Write-Host "Installing deqp-runner" 135 $env:Path += ";$($env:USERPROFILE)\.cargo\bin" 136 cargo install --git https://gitlab.freedesktop.org/anholt/deqp-runner.git 137 138 Get-Date 139 Write-Host "Complete" 140