11#! /bin/bash -e
22
33cd " $( dirname " $0 " ) "
4+ set -a; . .env; set +a
45
56print_usage () {
67 echo " Usage:"
@@ -140,6 +141,13 @@ fetch_luajit() {
140141 git -C src clone --depth 1 " ${url} "
141142}
142143
144+ fetch_mesa () {
145+ local url=" https://gitlab.freedesktop.org/mesa/mesa.git"
146+ rm -rf src/mesa
147+ git -C src clone --depth 1 " ${url} "
148+ pip3 install --no-cache-dir -U mako packaging pyyaml
149+ }
150+
143151fetch_moltenvk () {
144152 local url=" https://github.com/KhronosGroup/MoltenVK.git"
145153 rm -rf src/MoltenVK
@@ -171,6 +179,14 @@ fetch_shaderc() {
171179 git -C src clone --depth 1 " ${url} "
172180}
173181
182+ fetch_spirv-tools () {
183+ local tools_url=" https://github.com/KhronosGroup/SPIRV-Tools.git"
184+ local headers_url=" https://github.com/KhronosGroup/SPIRV-Headers.git"
185+ rm -rf src/SPIRV-{Tools,Headers}
186+ git -C src clone --depth 1 " ${tools_url} "
187+ git -C src clone --depth 1 " ${headers_url} "
188+ }
189+
174190fetch_svt-av1 () {
175191 local url=" https://gitlab.com/AOMediaCodec/SVT-AV1.git"
176192 rm -rf src/SVT-AV1
@@ -184,11 +200,11 @@ fetch_uchardet() {
184200}
185201
186202fetch_vulkan () {
187- local loaderurl =" https://github.com/KhronosGroup/Vulkan-Loader.git"
188- local headersurl =" https://github.com/KhronosGroup/Vulkan-Headers.git"
203+ local loader_url =" https://github.com/KhronosGroup/Vulkan-Loader.git"
204+ local headers_url =" https://github.com/KhronosGroup/Vulkan-Headers.git"
189205 rm -rf src/Vulkan-{Loader,Headers}
190- git -C src clone --depth 1 " ${loaderurl } "
191- git -C src clone --depth 1 " ${headersurl } "
206+ git -C src clone --depth 1 " ${loader_url } "
207+ git -C src clone --depth 1 " ${headers_url } "
192208}
193209
194210fetch_whisper () {
@@ -244,6 +260,7 @@ if [[ "$*" == "all" ]]; then
244260 fetch_mpv
245261 fetch_opus
246262 fetch_shaderc
263+ fetch_spirv-tools
247264 fetch_svt-av1
248265 fetch_uchardet
249266 fetch_vulkan
316333 " luajit" )
317334 fetch_luajit
318335 ;;
336+ " mesa" )
337+ fetch_mesa
338+ ;;
319339 " moltenvk" )
320340 fetch_moltenvk
321341 ;;
328348 " shaderc" )
329349 fetch_shaderc
330350 ;;
351+ " spirv-tools" )
352+ fetch_spirv-tools
353+ ;;
331354 " svt-av1" )
332355 fetch_svt-av1
333356 ;;
0 commit comments