mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-21 21:35:38 +00:00
CI: Build SPIRV-Cross
This commit is contained in:
parent
59eeb89243
commit
8a3ba53204
|
@ -49,6 +49,7 @@ SHADERC=2024.0
|
|||
SHADERC_GLSLANG=d73712b8f6c9047b09e99614e20d456d5ada2390
|
||||
SHADERC_SPIRVHEADERS=8b246ff75c6615ba4532fe4fde20f1be090c3764
|
||||
SHADERC_SPIRVTOOLS=04896c462d9f3f504c99a4698605b6524af813c1
|
||||
SPIRV_CROSS=vulkan-sdk-1.3.280.0
|
||||
|
||||
mkdir -p deps-build
|
||||
cd deps-build
|
||||
|
@ -86,6 +87,7 @@ c761044e4e204be8e0b9a2d7494f08671ca35b92c4c791c7049594ca7514197f shaderc-$SHADE
|
|||
d27f7359156a92749f8fd4681d1d518c736864213c431cf8144ecc2fb6689a2d shaderc-glslang-$SHADERC_GLSLANG.tar.gz
|
||||
cfeed5f9a97d12a9761a26e7f5bd10fedb1a8ce92033075151ae3bc7206fc229 shaderc-spirv-headers-$SHADERC_SPIRVHEADERS.tar.gz
|
||||
c0d01e758a543b3a358cb97af02c6817ebd3f5ff13a2edf9fb220646a3d67999 shaderc-spirv-tools-$SHADERC_SPIRVTOOLS.tar.gz
|
||||
eb11e1b3715b2211442b7e5933a1135885b664cc10530a1a022355fe9e1bb4ac SPIRV-Cross-$SPIRV_CROSS.tar.gz
|
||||
EOF
|
||||
|
||||
curl -L \
|
||||
|
@ -106,7 +108,8 @@ curl -L \
|
|||
-o "shaderc-$SHADERC.tar.gz" "https://github.com/google/shaderc/archive/refs/tags/v$SHADERC.tar.gz" \
|
||||
-o "shaderc-glslang-$SHADERC_GLSLANG.tar.gz" "https://github.com/KhronosGroup/glslang/archive/$SHADERC_GLSLANG.tar.gz" \
|
||||
-o "shaderc-spirv-headers-$SHADERC_SPIRVHEADERS.tar.gz" "https://github.com/KhronosGroup/SPIRV-Headers/archive/$SHADERC_SPIRVHEADERS.tar.gz" \
|
||||
-o "shaderc-spirv-tools-$SHADERC_SPIRVTOOLS.tar.gz" "https://github.com/KhronosGroup/SPIRV-Tools/archive/$SHADERC_SPIRVTOOLS.tar.gz"
|
||||
-o "shaderc-spirv-tools-$SHADERC_SPIRVTOOLS.tar.gz" "https://github.com/KhronosGroup/SPIRV-Tools/archive/$SHADERC_SPIRVTOOLS.tar.gz"\
|
||||
-o "SPIRV-Cross-$SPIRV_CROSS.tar.gz" "https://github.com/KhronosGroup/SPIRV-Cross/archive/refs/tags/$SPIRV_CROSS.tar.gz"
|
||||
|
||||
shasum -a 256 --check SHASUMS
|
||||
|
||||
|
@ -333,6 +336,16 @@ make -C build "-j$NPROCS"
|
|||
make -C build install
|
||||
cd ..
|
||||
|
||||
echo "Building SPIRV-Cross"
|
||||
rm -fr "SPIRV-Cross-$SPIRV_CROSS"
|
||||
tar xf "SPIRV-Cross-$SPIRV_CROSS.tar.gz"
|
||||
cd "SPIRV-Cross-$SPIRV_CROSS"
|
||||
patch -p1 < "$SCRIPTDIR/spirv-cross-changes.patch"
|
||||
cmake "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_UNIVERSAL" -DSPIRV_CROSS_SHARED=ON -DSPIRV_CROSS_STATIC=OFF -DSPIRV_CROSS_CLI=OFF -DSPIRV_CROSS_ENABLE_TESTS=OFF -DSPIRV_CROSS_ENABLE_GLSL=ON -DSPIRV_CROSS_ENABLE_HLSL=OFF -DSPIRV_CROSS_ENABLE_MSL=ON -DSPIRV_CROSS_ENABLE_CPP=OFF -DSPIRV_CROSS_ENABLE_REFLECT=OFF -DSPIRV_CROSS_ENABLE_C_API=ON -DSPIRV_CROSS_ENABLE_UTIL=ON -B build -G Ninja
|
||||
cmake --build build --parallel
|
||||
ninja -C build install
|
||||
cd ..
|
||||
|
||||
echo "Cleaning up..."
|
||||
cd ..
|
||||
rm -rf deps-build
|
||||
|
|
|
@ -58,6 +58,7 @@ set SHADERC=2024.0
|
|||
set SHADERC_GLSLANG=d73712b8f6c9047b09e99614e20d456d5ada2390
|
||||
set SHADERC_SPIRVHEADERS=8b246ff75c6615ba4532fe4fde20f1be090c3764
|
||||
set SHADERC_SPIRVTOOLS=04896c462d9f3f504c99a4698605b6524af813c1
|
||||
set SPIRV_CROSS=vulkan-sdk-1.3.280.0
|
||||
|
||||
call :downloadfile "freetype-%FREETYPE%.tar.gz" https://download.savannah.gnu.org/releases/freetype/freetype-%FREETYPE%.tar.gz 1ac27e16c134a7f2ccea177faba19801131116fd682efc1f5737037c5db224b5 || goto error
|
||||
call :downloadfile "harfbuzz-%HARFBUZZ%.zip" https://github.com/harfbuzz/harfbuzz/archive/refs/tags/%HARFBUZZ%.zip b2bc56184ae37324bc4829fde7d3f9e6916866ad711ee85792e457547c9fd127 || goto error
|
||||
|
@ -77,6 +78,7 @@ call :downloadfile "shaderc-%SHADERC%.zip" "https://github.com/google/shaderc/ar
|
|||
call :downloadfile "shaderc-glslang-%SHADERC_GLSLANG%.zip" "https://github.com/KhronosGroup/glslang/archive/%SHADERC_GLSLANG%.zip" 58a0d4b670986f8618c371b088f2ee11006596e8c71fe499ec044d5ea469d39b || goto error
|
||||
call :downloadfile "shaderc-spirv-headers-%SHADERC_SPIRVHEADERS%.zip" "https://github.com/KhronosGroup/SPIRV-Headers/archive/%SHADERC_SPIRVHEADERS%.zip" 1385538d16f8875e76209388187b3814cb0b0e9cecc3bc440faa7665b570ff47 || goto error
|
||||
call :downloadfile "shaderc-spirv-tools-%SHADERC_SPIRVTOOLS%.zip" "https://github.com/KhronosGroup/SPIRV-Tools/archive/%SHADERC_SPIRVTOOLS%.zip" 4eb9a3fc940ed1b05f968c181763dfdb8e637cbfbf57c625112b3ad0f76e2c28 || goto error
|
||||
call :downloadfile "SPIRV-Cross-%SPIRV_CROSS%.zip" "https://github.com/KhronosGroup/SPIRV-Cross/archive/refs/tags/%SPIRV_CROSS%.zip" 8428a0faf339b3fed2e9acb0b7a8176e7f5384c712b8d7f1e09505650dd10e93 || goto error
|
||||
|
||||
if %DEBUG%==1 (
|
||||
echo Building debug and release libraries...
|
||||
|
@ -246,6 +248,15 @@ cmake --build build --parallel || goto error
|
|||
ninja -C build install || goto error
|
||||
cd .. || goto error
|
||||
|
||||
echo Building SPIRV-Cross...
|
||||
rmdir /S /Q "SPIRV-Cross-%SPIRV_CROSS%"
|
||||
%SEVENZIP% x "SPIRV-Cross-%SPIRV_CROSS%.zip" || goto error
|
||||
cd "SPIRV-Cross-%SPIRV_CROSS%" || goto error
|
||||
cmake %ARM64TOOLCHAIN% -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DSPIRV_CROSS_SHARED=ON -DSPIRV_CROSS_STATIC=OFF -DSPIRV_CROSS_CLI=OFF -DSPIRV_CROSS_ENABLE_TESTS=OFF -DSPIRV_CROSS_ENABLE_GLSL=ON -DSPIRV_CROSS_ENABLE_HLSL=ON -DSPIRV_CROSS_ENABLE_MSL=OFF -DSPIRV_CROSS_ENABLE_CPP=OFF -DSPIRV_CROSS_ENABLE_REFLECT=OFF -DSPIRV_CROSS_ENABLE_C_API=ON -DSPIRV_CROSS_ENABLE_UTIL=ON -B build -G Ninja
|
||||
cmake --build build --parallel || goto error
|
||||
ninja -C build install || goto error
|
||||
cd .. || goto error
|
||||
|
||||
echo Cleaning up...
|
||||
cd ..
|
||||
rd /S /Q deps-build
|
||||
|
|
|
@ -56,6 +56,7 @@ set SHADERC=2024.0
|
|||
set SHADERC_GLSLANG=d73712b8f6c9047b09e99614e20d456d5ada2390
|
||||
set SHADERC_SPIRVHEADERS=8b246ff75c6615ba4532fe4fde20f1be090c3764
|
||||
set SHADERC_SPIRVTOOLS=04896c462d9f3f504c99a4698605b6524af813c1
|
||||
set SPIRV_CROSS=vulkan-sdk-1.3.280.0
|
||||
|
||||
call :downloadfile "freetype-%FREETYPE%.tar.gz" https://download.savannah.gnu.org/releases/freetype/freetype-%FREETYPE%.tar.gz 1ac27e16c134a7f2ccea177faba19801131116fd682efc1f5737037c5db224b5 || goto error
|
||||
call :downloadfile "harfbuzz-%HARFBUZZ%.zip" https://github.com/harfbuzz/harfbuzz/archive/refs/tags/%HARFBUZZ%.zip b2bc56184ae37324bc4829fde7d3f9e6916866ad711ee85792e457547c9fd127 || goto error
|
||||
|
@ -75,6 +76,7 @@ call :downloadfile "shaderc-%SHADERC%.zip" "https://github.com/google/shaderc/ar
|
|||
call :downloadfile "shaderc-glslang-%SHADERC_GLSLANG%.zip" "https://github.com/KhronosGroup/glslang/archive/%SHADERC_GLSLANG%.zip" 58a0d4b670986f8618c371b088f2ee11006596e8c71fe499ec044d5ea469d39b || goto error
|
||||
call :downloadfile "shaderc-spirv-headers-%SHADERC_SPIRVHEADERS%.zip" "https://github.com/KhronosGroup/SPIRV-Headers/archive/%SHADERC_SPIRVHEADERS%.zip" 1385538d16f8875e76209388187b3814cb0b0e9cecc3bc440faa7665b570ff47 || goto error
|
||||
call :downloadfile "shaderc-spirv-tools-%SHADERC_SPIRVTOOLS%.zip" "https://github.com/KhronosGroup/SPIRV-Tools/archive/%SHADERC_SPIRVTOOLS%.zip" 4eb9a3fc940ed1b05f968c181763dfdb8e637cbfbf57c625112b3ad0f76e2c28 || goto error
|
||||
call :downloadfile "SPIRV-Cross-%SPIRV_CROSS%.zip" "https://github.com/KhronosGroup/SPIRV-Cross/archive/refs/tags/%SPIRV_CROSS%.zip" 8428a0faf339b3fed2e9acb0b7a8176e7f5384c712b8d7f1e09505650dd10e93 || goto error
|
||||
|
||||
if %DEBUG%==1 (
|
||||
echo Building debug and release libraries...
|
||||
|
@ -243,6 +245,15 @@ cmake --build build --parallel || goto error
|
|||
ninja -C build install || goto error
|
||||
cd .. || goto error
|
||||
|
||||
echo Building SPIRV-Cross...
|
||||
rmdir /S /Q "SPIRV-Cross-%SPIRV_CROSS%"
|
||||
%SEVENZIP% x "SPIRV-Cross-%SPIRV_CROSS%.zip" || goto error
|
||||
cd "SPIRV-Cross-%SPIRV_CROSS%" || goto error
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DSPIRV_CROSS_SHARED=ON -DSPIRV_CROSS_STATIC=OFF -DSPIRV_CROSS_CLI=OFF -DSPIRV_CROSS_ENABLE_TESTS=OFF -DSPIRV_CROSS_ENABLE_GLSL=ON -DSPIRV_CROSS_ENABLE_HLSL=ON -DSPIRV_CROSS_ENABLE_MSL=OFF -DSPIRV_CROSS_ENABLE_CPP=OFF -DSPIRV_CROSS_ENABLE_REFLECT=OFF -DSPIRV_CROSS_ENABLE_C_API=ON -DSPIRV_CROSS_ENABLE_UTIL=ON -B build -G Ninja
|
||||
cmake --build build --parallel || goto error
|
||||
ninja -C build install || goto error
|
||||
cd .. || goto error
|
||||
|
||||
echo Cleaning up...
|
||||
cd ..
|
||||
rd /S /Q deps-build
|
||||
|
|
|
@ -26,6 +26,7 @@ SHADERC=2024.0
|
|||
SHADERC_GLSLANG=d73712b8f6c9047b09e99614e20d456d5ada2390
|
||||
SHADERC_SPIRVHEADERS=8b246ff75c6615ba4532fe4fde20f1be090c3764
|
||||
SHADERC_SPIRVTOOLS=04896c462d9f3f504c99a4698605b6524af813c1
|
||||
SPIRV_CROSS=vulkan-sdk-1.3.280.0
|
||||
|
||||
mkdir -p deps-build
|
||||
cd deps-build
|
||||
|
@ -50,6 +51,7 @@ c761044e4e204be8e0b9a2d7494f08671ca35b92c4c791c7049594ca7514197f shaderc-$SHADE
|
|||
d27f7359156a92749f8fd4681d1d518c736864213c431cf8144ecc2fb6689a2d shaderc-glslang-$SHADERC_GLSLANG.tar.gz
|
||||
cfeed5f9a97d12a9761a26e7f5bd10fedb1a8ce92033075151ae3bc7206fc229 shaderc-spirv-headers-$SHADERC_SPIRVHEADERS.tar.gz
|
||||
c0d01e758a543b3a358cb97af02c6817ebd3f5ff13a2edf9fb220646a3d67999 shaderc-spirv-tools-$SHADERC_SPIRVTOOLS.tar.gz
|
||||
eb11e1b3715b2211442b7e5933a1135885b664cc10530a1a022355fe9e1bb4ac SPIRV-Cross-$SPIRV_CROSS.tar.gz
|
||||
EOF
|
||||
|
||||
curl -C - -L \
|
||||
|
@ -71,7 +73,8 @@ curl -C - -L \
|
|||
-o "shaderc-$SHADERC.tar.gz" "https://github.com/google/shaderc/archive/refs/tags/v$SHADERC.tar.gz" \
|
||||
-o "shaderc-glslang-$SHADERC_GLSLANG.tar.gz" "https://github.com/KhronosGroup/glslang/archive/$SHADERC_GLSLANG.tar.gz" \
|
||||
-o "shaderc-spirv-headers-$SHADERC_SPIRVHEADERS.tar.gz" "https://github.com/KhronosGroup/SPIRV-Headers/archive/$SHADERC_SPIRVHEADERS.tar.gz" \
|
||||
-o "shaderc-spirv-tools-$SHADERC_SPIRVTOOLS.tar.gz" "https://github.com/KhronosGroup/SPIRV-Tools/archive/$SHADERC_SPIRVTOOLS.tar.gz"
|
||||
-o "shaderc-spirv-tools-$SHADERC_SPIRVTOOLS.tar.gz" "https://github.com/KhronosGroup/SPIRV-Tools/archive/$SHADERC_SPIRVTOOLS.tar.gz" \
|
||||
-o "SPIRV-Cross-$SPIRV_CROSS.tar.gz" "https://github.com/KhronosGroup/SPIRV-Cross/archive/refs/tags/$SPIRV_CROSS.tar.gz"
|
||||
|
||||
shasum -a 256 --check SHASUMS
|
||||
|
||||
|
@ -297,6 +300,16 @@ cmake --build build --parallel
|
|||
ninja -C build install
|
||||
cd ..
|
||||
|
||||
echo "Building SPIRV-Cross"
|
||||
rm -fr "SPIRV-Cross-$SPIRV_CROSS"
|
||||
tar xf "SPIRV-Cross-$SPIRV_CROSS.tar.gz"
|
||||
cd "SPIRV-Cross-$SPIRV_CROSS"
|
||||
patch -p1 < "$SCRIPTDIR/spirv-cross-changes.patch"
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DSPIRV_CROSS_SHARED=ON -DSPIRV_CROSS_STATIC=OFF -DSPIRV_CROSS_CLI=OFF -DSPIRV_CROSS_ENABLE_TESTS=OFF -DSPIRV_CROSS_ENABLE_GLSL=ON -DSPIRV_CROSS_ENABLE_HLSL=OFF -DSPIRV_CROSS_ENABLE_MSL=OFF -DSPIRV_CROSS_ENABLE_CPP=OFF -DSPIRV_CROSS_ENABLE_REFLECT=OFF -DSPIRV_CROSS_ENABLE_C_API=ON -DSPIRV_CROSS_ENABLE_UTIL=ON -B build -G Ninja
|
||||
cmake --build build --parallel
|
||||
ninja -C build install
|
||||
cd ..
|
||||
|
||||
echo "Cleaning up..."
|
||||
cd ..
|
||||
rm -r deps-build
|
||||
|
|
14
scripts/spirv-cross-changes.patch
Normal file
14
scripts/spirv-cross-changes.patch
Normal file
|
@ -0,0 +1,14 @@
|
|||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -73,9 +73,9 @@
|
||||
set(spirv-cross-link-flags "")
|
||||
|
||||
message(STATUS "SPIRV-Cross: Finding Git version for SPIRV-Cross.")
|
||||
-set(spirv-cross-build-version "unknown")
|
||||
+set(spirv-cross-build-version "vulkan-sdk-1.3.280.0")
|
||||
find_package(Git)
|
||||
-if (GIT_FOUND)
|
||||
+if (FALSE)
|
||||
execute_process(
|
||||
COMMAND ${GIT_EXECUTABLE} describe --always --tags --dirty=+
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
Loading…
Reference in a new issue