aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--graphics/vulkan-sdk/cmath.patch50
-rw-r--r--graphics/vulkan-sdk/glslang-revert.patch30
-rw-r--r--graphics/vulkan-sdk/vulkan-loader-cmake.patch13
-rw-r--r--graphics/vulkan-sdk/vulkan-sdk.SlackBuild39
-rw-r--r--graphics/vulkan-sdk/vulkan-sdk.info30
5 files changed, 86 insertions, 76 deletions
diff --git a/graphics/vulkan-sdk/cmath.patch b/graphics/vulkan-sdk/cmath.patch
deleted file mode 100644
index 1060fe600d44..000000000000
--- a/graphics/vulkan-sdk/cmath.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 80ddc06b39dd1164733b69b68231b497f51840ad Mon Sep 17 00:00:00 2001
-From: orbea <orbea@riseup.net>
-Date: Tue, 10 Sep 2019 10:33:19 -0700
-Subject: [PATCH] Fix build with gcc5.
-
-v2: Replace all instances of math.h with cmath.
----
- layers/core_validation.cpp | 1 -
- layers/parameter_validation_utils.cpp | 2 +-
- tests/vktestframework.cpp | 2 +-
- 3 files changed, 2 insertions(+), 3 deletions(-)
-
-diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
-index 4c3da8b5f..359c21e32 100644
---- a/layers/core_validation.cpp
-+++ b/layers/core_validation.cpp
-@@ -44,7 +44,6 @@
- #include <cmath>
- #include <iostream>
- #include <list>
--#include <math.h>
- #include <map>
- #include <memory>
- #include <mutex>
-diff --git a/layers/parameter_validation_utils.cpp b/layers/parameter_validation_utils.cpp
-index 1559ac455..6e67586f5 100644
---- a/layers/parameter_validation_utils.cpp
-+++ b/layers/parameter_validation_utils.cpp
-@@ -21,7 +21,7 @@
-
- #define NOMINMAX
-
--#include <math.h>
-+#include <cmath>
-
- #include "chassis.h"
- #include "stateless_validation.h"
-diff --git a/tests/vktestframework.cpp b/tests/vktestframework.cpp
-index 0d9dd584a..ad0338517 100644
---- a/tests/vktestframework.cpp
-+++ b/tests/vktestframework.cpp
-@@ -38,7 +38,7 @@
- #pragma warning(pop)
- #endif
- #include <limits.h>
--#include <math.h>
-+#include <cmath>
-
- #if defined(PATH_MAX) && !defined(MAX_PATH)
- #define MAX_PATH PATH_MAX
diff --git a/graphics/vulkan-sdk/glslang-revert.patch b/graphics/vulkan-sdk/glslang-revert.patch
new file mode 100644
index 000000000000..e5a475916193
--- /dev/null
+++ b/graphics/vulkan-sdk/glslang-revert.patch
@@ -0,0 +1,30 @@
+From 199d115e1542fe0a8427efda5fa36158474fb6cf Mon Sep 17 00:00:00 2001
+From: John Kessenich <cepheus@frii.com>
+Date: Tue, 5 Nov 2019 18:05:42 -0700
+Subject: [PATCH] Fix #1959 by reverting 7b0e236 to put files in two places.
+
+---
+ SPIRV/CMakeLists.txt | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+ mode change 100644 => 100755 SPIRV/CMakeLists.txt
+
+diff --git a/SPIRV/CMakeLists.txt b/SPIRV/CMakeLists.txt
+old mode 100644
+new mode 100755
+index e25ec0a13..9869bafdc
+--- a/SPIRV/CMakeLists.txt
++++ b/SPIRV/CMakeLists.txt
+@@ -90,9 +90,10 @@ if(ENABLE_GLSLANG_INSTALL)
+ install(TARGETS SPIRV EXPORT SPIRVTargets
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ endif()
+-
+- install(EXPORT SPVRemapperTargets DESTINATION lib/cmake)
+- install(EXPORT SPIRVTargets DESTINATION lib/cmake)
+
++ install(EXPORT SPVRemapperTargets DESTINATION lib/cmake)
++ install(EXPORT SPIRVTargets DESTINATION lib/cmake)
++
++ install(FILES ${HEADERS} ${SPVREMAP_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/SPIRV/)
+ install(FILES ${HEADERS} ${SPVREMAP_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/glslang/SPIRV/)
+ endif(ENABLE_GLSLANG_INSTALL)
diff --git a/graphics/vulkan-sdk/vulkan-loader-cmake.patch b/graphics/vulkan-sdk/vulkan-loader-cmake.patch
new file mode 100644
index 000000000000..dcb63fd6ccc9
--- /dev/null
+++ b/graphics/vulkan-sdk/vulkan-loader-cmake.patch
@@ -0,0 +1,13 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index d15214545..fe277fcd6 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -138,7 +138,7 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
+ # all compilers until they all accept the C++17 standard
+ if(CMAKE_COMPILER_IS_GNUCC)
+ set(COMMON_COMPILE_FLAGS "${COMMON_COMPILE_FLAGS} -Wno-stringop-truncation -Wno-stringop-overflow")
+- if(CMAKE_CXX_COMPILER_VERSION GREATER_EQUAL 7.1)
++ if(CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 7.1 OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.1)
+ set(COMMON_COMPILE_FLAGS "${COMMON_COMPILE_FLAGS} -Wimplicit-fallthrough=0")
+ endif()
+ endif()
diff --git a/graphics/vulkan-sdk/vulkan-sdk.SlackBuild b/graphics/vulkan-sdk/vulkan-sdk.SlackBuild
index 4b89d23d1ec2..853c38a2e31d 100644
--- a/graphics/vulkan-sdk/vulkan-sdk.SlackBuild
+++ b/graphics/vulkan-sdk/vulkan-sdk.SlackBuild
@@ -25,7 +25,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=vulkan-sdk
-VERSION=${VERSION:-1.1.121.0}
+VERSION=${VERSION:-1.1.126.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -73,12 +73,13 @@ cmake_build () {
make install DESTDIR=$PKG
}
-# Vulkan-ValidationLayers requires git versions
-# listed in the known_good.json file to build.
+# For best compatibility use git versions which upstream also uses.
+# Vulkan-ValidationLayers/scripts/known_good.json
+# glslang/known_good.json
# https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/1082
-GLSLANG_VERSION=${GLSLANG_VERSION:-34953810a62c5230cc059cfdf42dc44c5aab2246}
-SPIRV_HEADERS_VERSION=${SPIRV_HEADERS_VERSION:-38cafab379e5d16137cb97a485b9385191039b92}
-SPIRV_TOOLS_VERSION=${SPIRV_TOOLS_VERSION:-9b3cc3e05337358d0bd9fec1b7a51e3cbf55312b}
+GLSLANG_VERSION=${GLSLANG_VERSION:-b131630e7c749a5dc19faa458024260c71fb170f}
+SPIRV_HEADERS_VERSION=${SPIRV_HEADERS_VERSION:-af64a9e826bf5bb5fcd2434dd71be1e41e922563}
+SPIRV_TOOLS_VERSION=${SPIRV_TOOLS_VERSION:-02910ffdffaa2966f613ede0c516645f5555c13c}
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
@@ -111,6 +112,13 @@ find -L . \
chdir glslang-$GLSLANG_VERSION
+# Fix #1959 by reverting 7b0e236 to put files in two places.
+# https://github.com/KhronosGroup/glslang/commit/199d115e1542fe0a8427efda5fa36158474fb6cf
+# https://github.com/KhronosGroup/glslang/pull/1963
+# https://github.com/KhronosGroup/glslang/issues/1959
+# https://code.videolan.org/videolan/libplacebo/issues/71
+patch -p1 < $CWD/glslang-revert.patch
+
cmake_build \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
@@ -125,9 +133,21 @@ cmake_build
chdir Vulkan-Loader-sdk-$VERSION
+ORIGCFLAGS="$SLKCFLAGS"
+
+# Fix build with clang on 32-bit systems
+# https://github.com/gentoo/gentoo/pull/13369
+if [ "$ARCH" = i586 ] || [ "$ARCH" = i686 ] &&
+ "${CC:-cc}" --version 2>/dev/null | grep -qi clang; then
+ SLKCFLAGS="$SLKCFLAGS -fno-integrated-as"
+fi
+
# Require an older cmake version.
sed -i 's/3.10.2/3.5.2/' CMakeLists.txt
+# cmake 3.5.2 does not have GREATER_EQUAL
+patch -p1 < $CWD/vulkan-loader-cmake.patch
+
cmake_build \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
@@ -136,6 +156,8 @@ cmake_build \
-DBUILD_WSI_WAYLAND_SUPPORT=OFF \
-DVULKAN_HEADERS_INSTALL_DIR=$PKG/usr
+SLKCFLAGS="$ORIGCFLAGS"
+
chdir Vulkan-ValidationLayers-sdk-$VERSION
# Require an older cmake version.
@@ -144,11 +166,6 @@ sed -i 's/3.10.2/3.5.2/' CMakeLists.txt
# Disable hardcoded errors
sed -i '/-Werror/d' CMakeLists.txt
-# Fix build with gcc5.
-# https://github.com/KhronosGroup/Vulkan-ValidationLayers/pull/1240
-# https://github.com/KhronosGroup/Vulkan-ValidationLayers/commit/80ddc06b39dd1164733b69b68231b497f51840ad
-patch -p1 < $CWD/cmath.patch
-
cmake_build \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
diff --git a/graphics/vulkan-sdk/vulkan-sdk.info b/graphics/vulkan-sdk/vulkan-sdk.info
index c3b8f9b56653..2eb194b4439d 100644
--- a/graphics/vulkan-sdk/vulkan-sdk.info
+++ b/graphics/vulkan-sdk/vulkan-sdk.info
@@ -1,20 +1,20 @@
PRGNAM="vulkan-sdk"
-VERSION="1.1.121.0"
+VERSION="1.1.126.0"
HOMEPAGE="https://www.khronos.org/vulkan/"
-DOWNLOAD="https://github.com/KhronosGroup/SPIRV-Headers/archive/38cafab379e5d16137cb97a485b9385191039b92/SPIRV-Headers-38cafab379e5d16137cb97a485b9385191039b92.tar.gz \
- https://github.com/KhronosGroup/SPIRV-Tools/archive/9b3cc3e05337358d0bd9fec1b7a51e3cbf55312b/SPIRV-Tools-9b3cc3e05337358d0bd9fec1b7a51e3cbf55312b.tar.gz \
- https://github.com/KhronosGroup/Vulkan-Headers/archive/sdk-1.1.121.0/Vulkan-Headers-sdk-1.1.121.0.tar.gz \
- https://github.com/KhronosGroup/Vulkan-Loader/archive/sdk-1.1.121.0/Vulkan-Loader-sdk-1.1.121.0.tar.gz \
- https://github.com/KhronosGroup/Vulkan-Tools/archive/sdk-1.1.121.0/Vulkan-Tools-sdk-1.1.121.0.tar.gz \
- https://github.com/KhronosGroup/Vulkan-ValidationLayers/archive/sdk-1.1.121.0/Vulkan-ValidationLayers-sdk-1.1.121.0.tar.gz \
- https://github.com/KhronosGroup/glslang/archive/34953810a62c5230cc059cfdf42dc44c5aab2246/glslang-34953810a62c5230cc059cfdf42dc44c5aab2246.tar.gz"
-MD5SUM="4d2cc6ae9deb7df3a4f05bf6de94a997 \
- 7a27f5d9eb8e75d333284a93eaf58663 \
- 6a19a3244f0bfdb0f9cc5ce342b5bd38 \
- 6c437cf1c5d288c1c7b19ce13a33e426 \
- 8b4421281a8854af63e74515f87023a1 \
- 57706105b91ff5e9c1ae3020286f9fba \
- 14011b4251ed8790597f0ee4fbfeaefe"
+DOWNLOAD="https://github.com/KhronosGroup/SPIRV-Headers/archive/af64a9e826bf5bb5fcd2434dd71be1e41e922563/SPIRV-Headers-af64a9e826bf5bb5fcd2434dd71be1e41e922563.tar.gz \
+ https://github.com/KhronosGroup/SPIRV-Tools/archive/02910ffdffaa2966f613ede0c516645f5555c13c/SPIRV-Tools-02910ffdffaa2966f613ede0c516645f5555c13c.tar.gz \
+ https://github.com/KhronosGroup/Vulkan-Headers/archive/sdk-1.1.126.0/Vulkan-Headers-sdk-1.1.126.0.tar.gz \
+ https://github.com/KhronosGroup/Vulkan-Loader/archive/sdk-1.1.126.0/Vulkan-Loader-sdk-1.1.126.0.tar.gz \
+ https://github.com/KhronosGroup/Vulkan-Tools/archive/sdk-1.1.126.0/Vulkan-Tools-sdk-1.1.126.0.tar.gz \
+ https://github.com/KhronosGroup/Vulkan-ValidationLayers/archive/sdk-1.1.126.0/Vulkan-ValidationLayers-sdk-1.1.126.0.tar.gz \
+ https://github.com/KhronosGroup/glslang/archive/b131630e7c749a5dc19faa458024260c71fb170f/glslang-b131630e7c749a5dc19faa458024260c71fb170f.tar.gz"
+MD5SUM="1928d2983a91d245bade6a1ebb103578 \
+ 4d809863ad9d0e5003684542533c65ae \
+ 28254c1ace5aaa2d04221b3bfb2e01c1 \
+ 8c435cf0840df4d985205c3513ecaf44 \
+ d7ebc4991620ff33d9929494e54cb0ab \
+ 2bfa2f064392bde70c5e6fab53b35416 \
+ d3dfe608aca53f208b69d19a9f14af5a"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="python3"