summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
author orbea2020-10-15 17:47:28 +0200
committer Willy Sudiarto Raharjo2020-10-17 04:36:27 +0200
commitb140d81b0956c995a61cfb8a4c83f31d39e099db (patch)
treecd6c45cc02e822d5348412c5cc722e1fb65e7521 /graphics
parenta693cfc07de9914bc83ab6e0c33d5ff903d218a3 (diff)
downloadslackbuilds-b140d81b0956c995a61cfb8a4c83f31d39e099db.tar.gz
graphics/libplacebo: Fix build with newer glslang.
Signed-off-by: orbea <orbea@riseup.net> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'graphics')
-rw-r--r--graphics/libplacebo/glslang_version.patch70
-rw-r--r--graphics/libplacebo/libplacebo.SlackBuild3
2 files changed, 72 insertions, 1 deletions
diff --git a/graphics/libplacebo/glslang_version.patch b/graphics/libplacebo/glslang_version.patch
new file mode 100644
index 0000000000..6c8363178f
--- /dev/null
+++ b/graphics/libplacebo/glslang_version.patch
@@ -0,0 +1,70 @@
+commit b2fa57a00d3b71c9f897bc622937d661f3c227cc
+Author: orbea <orbea@riseup.net>
+Date: Thu Oct 15 07:23:32 2020 -0700
+
+ Hack around the newer glslang version scheme.
+
+diff --git a/src/glsl/glslang.cc b/src/glsl/glslang.cc
+index 07cf8f1..4560c77 100644
+--- a/src/glsl/glslang.cc
++++ b/src/glsl/glslang.cc
+@@ -23,7 +23,7 @@ extern "C" {
+ }
+
+ #include <glslang/Include/ResourceLimits.h>
+-#include <glslang/Include/revision.h>
++#include <glslang/build_info.h>
+ #include <glslang/Public/ShaderLang.h>
+ #include <SPIRV/GlslangToSpv.h>
+
+@@ -36,7 +36,7 @@ static int pl_glslang_refcount;
+
+ int pl_glslang_version()
+ {
+- return GLSLANG_PATCH_LEVEL;
++ return GLSLANG_VERSION_MAJOR;
+ }
+
+ bool pl_glslang_init()
+@@ -78,7 +78,7 @@ struct pl_glslang_res *pl_glslang_compile(const char *glsl, uint32_t api_ver,
+ if (api_ver >= EShTargetVulkan_1_1)
+ spirv_version = EShTargetSpv_1_3;
+
+-#if GLSLANG_PATCH_LEVEL >= 3667
++#if GLSLANG_VERSION_MAJOR >= 10
+ if (api_ver >= EShTargetVulkan_1_2)
+ spirv_version = EShTargetSpv_1_5;
+ #endif
+@@ -200,7 +200,7 @@ const TBuiltInResource DefaultTBuiltInResource = {
+ /* .MaxCullDistances = */ 8,
+ /* .MaxCombinedClipAndCullDistances = */ 8,
+ /* .MaxSamples = */ 4,
+-#if GLSLANG_PATCH_LEVEL >= 2892
++#if GLSLANG_VERSION_MAJOR >= 10
+ /* .maxMeshOutputVerticesNV = */ 256,
+ /* .maxMeshOutputPrimitivesNV = */ 512,
+ /* .maxMeshWorkGroupSizeX_NV = */ 32,
+diff --git a/src/meson.build b/src/meson.build
+index 5a77cea..60cb646 100644
+--- a/src/meson.build
++++ b/src/meson.build
+@@ -49,7 +49,7 @@ endif
+
+ # work-arounds for glslang braindeath
+ glslang_combined = disabler()
+-glslang_min_ver = 2763
++glslang_min_ver = 10
+ glslang_req = get_option('glslang')
+
+ if glslang_req.auto() and shaderc.found()
+@@ -83,8 +83,8 @@ else
+ endif
+
+ if glslang_found
+- glslang_ver = cxx.get_define('GLSLANG_PATCH_LEVEL',
+- prefix: '#include <glslang/Include/revision.h>'
++ glslang_ver = cxx.get_define('GLSLANG_VERSION_MAJOR',
++ prefix: '#include <glslang/build_info.h>'
+ ).to_int()
+
+ if glslang_ver >= glslang_min_ver
diff --git a/graphics/libplacebo/libplacebo.SlackBuild b/graphics/libplacebo/libplacebo.SlackBuild
index 2cbc5a90db..ff494f1716 100644
--- a/graphics/libplacebo/libplacebo.SlackBuild
+++ b/graphics/libplacebo/libplacebo.SlackBuild
@@ -24,7 +24,7 @@
PRGNAM=libplacebo
VERSION=${VERSION:-2.72.0}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -83,6 +83,7 @@ sed -i 's/1.4.0/1.3.1/' src/meson.build
# Fix the build with newer glslang versions.
patch -p1 < $CWD/glslang.patch
+patch -p1 < $CWD/glslang_version.patch
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \