summaryrefslogtreecommitdiff
path: root/build-android
diff options
context:
space:
mode:
authorCody Northrop <cnorthrop@google.com>2016-08-01 10:27:25 -0600
committerCody Northrop <cnorthrop@google.com>2016-08-02 13:41:58 -0600
commit662666d054d949de0613bd3830c1ff45b960204a (patch)
tree97cf2f7ce1539ae0c29fdb7ecf5fcd1f5d521638 /build-android
parent5c4c68c37fbd5e01b931fb47ff2ba31c896bcbee (diff)
toolchain: Update revisions for Android
Also add spirv-headers, a new dependency for shaderc.
Diffstat (limited to 'build-android')
-rw-r--r--build-android/glslang_revision_android2
-rw-r--r--build-android/shaderc_revision_android2
-rw-r--r--build-android/spirv-headers_revision_android1
-rw-r--r--build-android/spirv-tools_revision_android2
-rwxr-xr-xbuild-android/update_external_sources_android.bat53
-rwxr-xr-xbuild-android/update_external_sources_android.sh22
6 files changed, 78 insertions, 4 deletions
diff --git a/build-android/glslang_revision_android b/build-android/glslang_revision_android
index 56c5bed5..024f9429 100644
--- a/build-android/glslang_revision_android
+++ b/build-android/glslang_revision_android
@@ -1 +1 @@
-d99524197f3b68dbd6267bd3f4d7e8a0f49167b4
+1176530bf59096923b09e297cc304a337a915939
diff --git a/build-android/shaderc_revision_android b/build-android/shaderc_revision_android
index 81875238..0c161a0d 100644
--- a/build-android/shaderc_revision_android
+++ b/build-android/shaderc_revision_android
@@ -1 +1 @@
-4213a472474053f456464b7d00d14adf814ecc44
+c63df792b2d535734cd0d1e6111de7ca29dcb555
diff --git a/build-android/spirv-headers_revision_android b/build-android/spirv-headers_revision_android
new file mode 100644
index 00000000..74846cc5
--- /dev/null
+++ b/build-android/spirv-headers_revision_android
@@ -0,0 +1 @@
+3814effb879ab5a98a7b9288a4b4c7849d2bc8ac
diff --git a/build-android/spirv-tools_revision_android b/build-android/spirv-tools_revision_android
index 9a829b9c..2ce5d177 100644
--- a/build-android/spirv-tools_revision_android
+++ b/build-android/spirv-tools_revision_android
@@ -1 +1 @@
-469f0e8fd53b527ad410c46bf18eee327c9256a3
+e7a9e007384db16bc39dae01fadf4b73e754ab7e
diff --git a/build-android/update_external_sources_android.bat b/build-android/update_external_sources_android.bat
index ad5bd50d..8f6db224 100755
--- a/build-android/update_external_sources_android.bat
+++ b/build-android/update_external_sources_android.bat
@@ -25,6 +25,7 @@ set BUILD_DIR=%ANDROID_BUILD_DIR%..
set BASE_DIR=%BUILD_DIR%\external
set GLSLANG_DIR=%BASE_DIR%\glslang
set SPIRV_TOOLS_DIR=%BASE_DIR%\spirv-tools
+set SPIRV_HEADERS_DIR=%BASE_DIR%\spirv-tools\external\spirv-headers
set SHADERC_DIR=%BASE_DIR%\shaderc
for %%X in (where.exe) do (set FOUND=%%~$PATH:X)
@@ -78,6 +79,13 @@ if not exist %ANDROID_BUILD_DIR%\spirv-tools_revision_android (
goto:error
)
+if not exist %ANDROID_BUILD_DIR%\spirv-headers_revision_android (
+ echo.
+ echo Missing spirv-headers_revision_android file. Place it in %ANDROID_BUILD_DIR%
+ set errorCode=1
+ goto:error
+)
+
if not exist %ANDROID_BUILD_DIR%\shaderc_revision_android (
echo.
echo Missing shaderc_revision_android file. Place it in %ANDROID_BUILD_DIR%
@@ -87,16 +95,19 @@ if not exist %ANDROID_BUILD_DIR%\shaderc_revision_android (
set /p GLSLANG_REVISION= < glslang_revision_android
set /p SPIRV_TOOLS_REVISION= < spirv-tools_revision_android
+set /p SPIRV_HEADERS_REVISION= < spirv-headers_revision_android
set /p SHADERC_REVISION= < shaderc_revision_android
echo GLSLANG_REVISION=%GLSLANG_REVISION%
echo SPIRV_TOOLS_REVISION=%SPIRV_TOOLS_REVISION%
+echo SPIRV_HEADERS_REVISION=%SPIRV_HEADERS_REVISION%
echo SHADERC_REVISION=%SHADERC_REVISION%
-echo Creating and/or updating glslang, spirv-tools, shaderc in %BASE_DIR%
+echo Creating and/or updating glslang, spirv-tools, spirv-headers, shaderc in %BASE_DIR%
set sync-glslang=1
set sync-spirv-tools=1
+set sync-spirv-headers=1
set sync-shaderc=1
set build-shaderc=1
@@ -125,6 +136,19 @@ if %sync-spirv-tools% equ 1 (
if %errorCode% neq 0 (goto:error)
)
+if %sync-spirv-headers% equ 1 (
+ if exist %SPIRV_HEADERS_DIR% (
+ rd /S /Q %SPIRV_HEADERS_DIR%
+ )
+ if %ERRORLEVEL% neq 0 (goto:error)
+ if not exist %SPIRV_HEADERS_DIR% (
+ call:create_spirv-headers
+ )
+ if %errorCode% neq 0 (goto:error)
+ call:update_spirv-headers
+ if %errorCode% neq 0 (goto:error)
+)
+
if %sync-shaderc% equ 1 (
if exist %SHADERC_DIR% (
rd /S /Q %SHADERC_DIR%
@@ -154,6 +178,8 @@ goto:finish
:finish
if not "%cd%\" == "%BUILD_DIR%" ( cd %BUILD_DIR% )
endlocal
+REM This needs a fix to return error, something like exit %errorCode%
+REM Right now it is returning 0
goto:eof
@@ -210,6 +236,31 @@ goto:eof
)
goto:eof
+:create_spirv-headers
+ echo.
+ echo Creating local spirv-headers repository %SPIRV_HEADERS_DIR%
+ mkdir %SPIRV_HEADERS_DIR%
+ cd %SPIRV_HEADERS_DIR%
+ git clone https://github.com/KhronosGroup/SPIRV-Headers.git .
+ git checkout %SPIRV_HEADERS_REVISION%
+ if not exist %SPIRV_HEADERS_DIR%\include (
+ echo spirv-headers source download failed!
+ set errorCode=1
+ )
+goto:eof
+
+:update_spirv-headers
+ echo.
+ echo Updating %SPIRV_HEADERS_DIR%
+ cd %SPIRV_HEADERS_DIR%
+ git fetch --all
+ git checkout %SPIRV_HEADERS_REVISION%
+ if not exist %SPIRV_HEADERS_DIR%\include (
+ echo spirv-headers source update failed!
+ set errorCode=1
+ )
+goto:eof
+
:create_shaderc
echo.
echo Creating local shaderc repository %SHADERC_DIR%
diff --git a/build-android/update_external_sources_android.sh b/build-android/update_external_sources_android.sh
index 4ceaeeb9..ba5153c6 100755
--- a/build-android/update_external_sources_android.sh
+++ b/build-android/update_external_sources_android.sh
@@ -24,6 +24,7 @@ BASEDIR=$BUILDDIR/external
GLSLANG_REVISION=$(cat $ANDROIDBUILDDIR/glslang_revision_android)
SPIRV_TOOLS_REVISION=$(cat $ANDROIDBUILDDIR/spirv-tools_revision_android)
+SPIRV_HEADERS_REVISION=$(cat $ANDROIDBUILDDIR/spirv-headers_revision_android)
SHADERC_REVISION=$(cat $ANDROIDBUILDDIR/shaderc_revision_android)
echo "GLSLANG_REVISION=$GLSLANG_REVISION"
@@ -62,6 +63,22 @@ function update_spirv-tools () {
git checkout $SPIRV_TOOLS_REVISION
}
+function create_spirv-headers () {
+ rm -rf $BASEDIR/spirv-tools/external/spirv-headers
+ echo "Creating local spirv-headers repository ($BASEDIR/spirv-tools/external/spirv-headers)."
+ mkdir -p $BASEDIR/spirv-tools/external/spirv-headers
+ cd $BASEDIR/spirv-tools/external/spirv-headers
+ git clone https://github.com/KhronosGroup/SPIRV-Headers.git .
+ git checkout $SPIRV_HEADERS_REVISION
+}
+
+function update_spirv-headers () {
+ echo "Updating $BASEDIR/spirv-tools/external/spirv-headers"
+ cd $BASEDIR/spirv-tools/external/spirv-headers
+ git fetch --all
+ git checkout $SPIRV_HEADERS_REVISION
+}
+
function create_shaderc () {
rm -rf $BASEDIR/shaderc
echo "Creating local shaderc repository ($BASEDIR/shaderc)."
@@ -95,6 +112,11 @@ if [ ! -d "$BASEDIR/spirv-tools" -o ! -d "$BASEDIR/spirv-tools/.git" ]; then
fi
update_spirv-tools
+if [ ! -d "$BASEDIR/spirv-tools/external/spirv-headers" -o ! -d "$BASEDIR/spirv-tools/external/spirv-headers/.git" ]; then
+ create_spirv-headers
+fi
+update_spirv-headers
+
if [ ! -d "$BASEDIR/shaderc" -o ! -d "$BASEDIR/shaderc/.git" ]; then
create_shaderc
fi