summaryrefslogtreecommitdiff
path: root/source/x/vulkan-sdk
diff options
context:
space:
mode:
Diffstat (limited to 'source/x/vulkan-sdk')
-rwxr-xr-xsource/x/vulkan-sdk/fetch-sources.sh8
-rwxr-xr-xsource/x/vulkan-sdk/vulkan-sdk.SlackBuild29
-rw-r--r--source/x/vulkan-sdk/vulkan-sdk.url4
3 files changed, 27 insertions, 14 deletions
diff --git a/source/x/vulkan-sdk/fetch-sources.sh b/source/x/vulkan-sdk/fetch-sources.sh
index 67ec96b9..4a15b10e 100755
--- a/source/x/vulkan-sdk/fetch-sources.sh
+++ b/source/x/vulkan-sdk/fetch-sources.sh
@@ -25,10 +25,10 @@
# github, and then look at the revisions listed in the external_revisions
# directory to fetch the proper glslang, SPIRV-Headers, and SPIRV-Tools.
#
-# Example: VERSION=1.1.85.0 ./fetch-sources.sh
+# Example: VERSION=1.1.92.1 ./fetch-sources.sh
-VERSION=${VERSION:-1.1.85.0}
-BRANCH=${BRANCH:-sdk-1.1.85}
+VERSION=${VERSION:-1.1.92.1}
+BRANCH=${BRANCH:-sdk-1.1.92}
rm -rf Vulkan-*-*.tar.?z glslang* SPIRV-Tools* SPIRV-Headers* \
Vulkan-Headers-sdk-${VERSION}* \
@@ -52,7 +52,7 @@ GLSLANG_COMMIT=$(python3 - << EOF
import json
import tarfile
with tarfile.open('Vulkan-ValidationLayers-sdk-$VERSION.tar') as layers:
- known_good = layers.extractfile('Vulkan-ValidationLayers-sdk-1.1.85.0/scripts/known_good.json')
+ known_good = layers.extractfile('Vulkan-ValidationLayers-sdk-1.1.92.1/scripts/known_good.json')
known_good_info = json.loads(known_good.read())
glslang = next(repo for repo in known_good_info['repos'] if repo['name'] == 'glslang')
print(glslang['commit'])
diff --git a/source/x/vulkan-sdk/vulkan-sdk.SlackBuild b/source/x/vulkan-sdk/vulkan-sdk.SlackBuild
index c79ac738..34478a6a 100755
--- a/source/x/vulkan-sdk/vulkan-sdk.SlackBuild
+++ b/source/x/vulkan-sdk/vulkan-sdk.SlackBuild
@@ -29,8 +29,6 @@ PKGNAM=vulkan-sdk
VERSION=${VERSION:-$(echo Vulkan-ValidationLayers-sdk-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
BUILD=${BUILD:-1}
-NUMJOBS=${NUMJOBS:--j7}
-
# Automatically determine the architecture we're building on:
MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
@@ -51,6 +49,8 @@ if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
exit 0
fi
+NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
+
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
@@ -77,8 +77,14 @@ SPIRV_TOOLS_VERSION=$(echo SPIRV-Tools-*.tar.?z | rev | cut -f 3- -d . | cut -f
rm -rf $PKG
mkdir -p $TMP $PKG
+
cd $TMP
-rm -rf Vulkan-ValidationLayers-sdk-$VERSION Vulkan-Headers-sdk-$VERSION glslang-$GLSLANG_VERSION
+# Clear existing tmp sources:
+rm -rf glslang-${GLSLANG_VERSION} \
+ Vulkan-Headers-sdk-$VERSION \
+ Vulkan-Loader-sdk-$VERSION \
+ Vulkan-ValidationLayers-sdk-$VERSION \
+ Vulkan-Tools-sdk-$VERSION
tar xvf $CWD/glslang-${GLSLANG_VERSION}.tar.?z || exit 1
cd glslang-$GLSLANG_VERSION/External
@@ -116,7 +122,6 @@ make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
cd $TMP
-
tar xvf $CWD/Vulkan-Headers-sdk-$VERSION.tar.?z || exit 1
cd Vulkan-Headers-sdk-$VERSION
@@ -138,8 +143,21 @@ cmake \
..
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
-cd $TMP
+# Make sure some SPIR-V headers are there:
+HEADER_SOURCE_DIR="$TMP/glslang-${GLSLANG_VERSION}/External/spirv-tools/external/spirv-headers/include/spirv/unified1"
+mkdir -p $PKG/usr/include/vulkan
+for file in GLSL.std.450.h spirv.h spirv.hpp spirv.hpp11 spirv.json \
+ spirv.lua spirv.py ; do
+ if [ -r $HEADER_SOURCE_DIR/$file -a ! -r $PKG/usr/include/vulkan/$file ]; then
+ cp -a --verbose $HEADER_SOURCE_DIR/$file $PKG/usr/include/vulkan/$file
+ chown root:root $PKG/usr/include/vulkan/$file
+ chmod 644 $PKG/usr/include/vulkan/$file
+ fi
+done
+unset HEADER_SOURCE_DIR
+
+cd $TMP
tar xvf $CWD/Vulkan-Loader-sdk-$VERSION.tar.?z || exit 1
cd $TMP/Vulkan-Loader-sdk-$VERSION
@@ -201,7 +219,6 @@ cd build
make install DESTDIR=$PKG || exit 1
cd $TMP
-
tar xvf $CWD/Vulkan-Tools-sdk-$VERSION.tar.?z || exit 1
cd $TMP/Vulkan-Tools-sdk-$VERSION
diff --git a/source/x/vulkan-sdk/vulkan-sdk.url b/source/x/vulkan-sdk/vulkan-sdk.url
deleted file mode 100644
index 5dcdf19f..00000000
--- a/source/x/vulkan-sdk/vulkan-sdk.url
+++ /dev/null
@@ -1,4 +0,0 @@
-https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/archive/sdk-1.1.73.0/Vulkan-LoaderAndValidationLayers-sdk-1.1.73.0.tar.gz
-https://github.com/KhronosGroup/glslang/archive/3bb4c48cd95892a5cfcd63df20fcc47fd51c97a0/glslang-3bb4c48cd95892a5cfcd63df20fcc47fd51c97a0.tar.gz
-https://github.com/KhronosGroup/SPIRV-Headers/archive/12f8de9f04327336b699b1b80aa390ae7f9ddbf4/SPIRV-Headers-12f8de9f04327336b699b1b80aa390ae7f9ddbf4.tar.gz
-https://github.com/KhronosGroup/SPIRV-Tools/archive/26a698c34788bb69123a1f3789970a16cf4d9641/SPIRV-Tools-26a698c34788bb69123a1f3789970a16cf4d9641.tar.gz