2017-12-05 09:25:04 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2019-11-05 15:07:15 +00:00
|
|
|
GLSLANG_REV=5d0e01d9e7f9fae7609843d00f9fc5f41c3ddfdd
|
|
|
|
SPIRV_TOOLS_REV=e0d5544c9864e1b6852c4ab949892898b2866c3e
|
2019-09-18 19:56:51 +00:00
|
|
|
SPIRV_HEADERS_REV=601d738723ac381741311c6c98c36d6170be14a2
|
2017-12-05 09:25:04 +00:00
|
|
|
|
2019-04-12 12:44:24 +00:00
|
|
|
if [ -z $PROTOCOL ]; then
|
|
|
|
PROTOCOL=git
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Using protocol \"$PROTOCOL\" for checking out repositories. If this is problematic, try PROTOCOL=https $0."
|
|
|
|
|
2017-12-05 09:25:04 +00:00
|
|
|
if [ -d external/glslang ]; then
|
|
|
|
echo "Updating glslang to revision $GLSLANG_REV."
|
|
|
|
cd external/glslang
|
|
|
|
git fetch origin
|
|
|
|
git checkout $GLSLANG_REV
|
|
|
|
else
|
|
|
|
echo "Cloning glslang revision $GLSLANG_REV."
|
|
|
|
mkdir -p external
|
|
|
|
cd external
|
2019-04-12 12:44:24 +00:00
|
|
|
git clone $PROTOCOL://github.com/KhronosGroup/glslang.git
|
2017-12-05 09:25:04 +00:00
|
|
|
cd glslang
|
|
|
|
git checkout $GLSLANG_REV
|
|
|
|
fi
|
|
|
|
cd ../..
|
|
|
|
|
|
|
|
if [ -d external/spirv-tools ]; then
|
|
|
|
echo "Updating SPIRV-Tools to revision $SPIRV_TOOLS_REV."
|
|
|
|
cd external/spirv-tools
|
|
|
|
git fetch origin
|
|
|
|
git checkout $SPIRV_TOOLS_REV
|
|
|
|
else
|
|
|
|
echo "Cloning SPIRV-Tools revision $SPIRV_TOOLS_REV."
|
|
|
|
mkdir -p external
|
|
|
|
cd external
|
2019-04-12 12:44:24 +00:00
|
|
|
git clone $PROTOCOL://github.com/KhronosGroup/SPIRV-Tools.git spirv-tools
|
2017-12-05 09:25:04 +00:00
|
|
|
cd spirv-tools
|
|
|
|
git checkout $SPIRV_TOOLS_REV
|
2018-03-12 12:09:25 +00:00
|
|
|
fi
|
2017-12-05 09:25:04 +00:00
|
|
|
|
2018-03-12 12:09:25 +00:00
|
|
|
if [ -d external/spirv-headers ]; then
|
|
|
|
cd external/spirv-headers
|
|
|
|
git pull origin master
|
2018-10-26 08:53:11 +00:00
|
|
|
git checkout $SPIRV_HEADERS_REV
|
2018-03-12 12:09:25 +00:00
|
|
|
cd ../..
|
|
|
|
else
|
2019-04-12 12:44:24 +00:00
|
|
|
git clone $PROTOCOL://github.com/KhronosGroup/SPIRV-Headers.git external/spirv-headers
|
2018-10-26 08:53:11 +00:00
|
|
|
cd external/spirv-headers
|
|
|
|
git checkout $SPIRV_HEADERS_REV
|
|
|
|
cd ../..
|
2017-12-05 09:25:04 +00:00
|
|
|
fi
|
2018-03-12 12:09:25 +00:00
|
|
|
|
2017-12-05 09:25:04 +00:00
|
|
|
cd ../..
|
|
|
|
|