From f9adca60821d69cf7a3db01e9d94b18282a67d94 Mon Sep 17 00:00:00 2001 From: BtbN Date: Mon, 7 Sep 2020 21:32:38 +0200 Subject: [PATCH] Build fixed version of Vulkan-Loader --- scripts.d/45-vulkan.sh | 45 +++++++++++++++++++----------------------- 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/scripts.d/45-vulkan.sh b/scripts.d/45-vulkan.sh index 0a7627b..b2aa8b6 100755 --- a/scripts.d/45-vulkan.sh +++ b/scripts.d/45-vulkan.sh @@ -1,7 +1,6 @@ #!/bin/bash -LUNARG_VERSION="1.2.148.1" -LUNARG_SRC="https://sdk.lunarg.com/sdk/download/${LUNARG_VERSION}/windows/VulkanSDK-${LUNARG_VERSION}-Installer.exe" +LOADER_REPO="https://github.com/BtbN/Vulkan-Loader.git" ffbuild_enabled() { [[ $VARIANT != *vulkan* ]] && return -1 @@ -16,32 +15,28 @@ ffbuild_dockerstage() { ffbuild_dockerbuild() { mkdir vulkan && cd vulkan - if [[ $TARGET == win64 ]]; then - wget --no-cookies -O vulkan.exe "$LUNARG_SRC" - 7z x vulkan.exe Include/vulkan Lib/vulkan-1.lib + git-mini-clone "$LOADER_REPO" master loader - find . -type f -exec chmod 644 {} \; - find . -type d -exec chmod 755 {} \; + HEADERS_REPO="$(grep -A10 'name.*:.*Vulkan-Headers' loader/scripts/known_good.json | grep url | head -n1 | cut -d'"' -f4)" + HEADERS_COMMIT="$(grep -A10 'name.*:.*Vulkan-Headers' loader/scripts/known_good.json | grep commit | head -n1 | cut -d'"' -f4)" - mv Include/* "$FFBUILD_PREFIX"/include/. - mv Lib/* "$FFBUILD_PREFIX"/lib/. - - mkdir -p "$FFBUILD_PREFIX"/lib/pkgconfig - cat > "$FFBUILD_PREFIX"/lib/pkgconfig/vulkan.pc <