forked from ports/contrib
libplacebo: fix build with new glslang
This commit is contained in:
parent
3f519d852e
commit
a0bb7c0c87
@ -1,5 +1,6 @@
|
||||
untrusted comment: verify with /etc/ports/contrib.pub
|
||||
RWSagIOpLGJF3wTCKC/BVNUytHcwJt1/OLyoE6ZhzkeS7aQ/zM8YdbSFj/LLF20uLxd+WAMc0kiynSRSlec8dnS+EsPdnCAS8Qo=
|
||||
SHA256 (Pkgfile) = b6053a631e1dc62c4fb879c292b4e7fc87add185192f11bc0703e6cfcb9e889f
|
||||
RWSagIOpLGJF3zIQ8nmMm2jZI5LZ8xI23IaU9SsfPY3QvhlaLjDWQwyUlyulLl+2hUk46VMzgU41cVLGYafZZ/D4du9airnUQQE=
|
||||
SHA256 (Pkgfile) = 22dc56f80c8f436e8e3368dd683113de72de74887a527bcd0d4430cb55a7bb07
|
||||
SHA256 (.footprint) = 4bb8793710d63c580ba4d5f55a4d3137ef2fe98f80af4739176dfdf0483874c2
|
||||
SHA256 (libplacebo-v2.72.0.tar.gz) = e570c5692cd974c43acf430f6b3fe348814f5052c3a1f7a74a1ba10a69ac2715
|
||||
SHA256 (glslang_header_include_path.patch) = f0b4e20a44394b1994590d881709ffe663435f2012970b93e5d2f7cf5f8f8003
|
||||
|
@ -6,18 +6,23 @@
|
||||
|
||||
name=libplacebo
|
||||
version=2.72.0
|
||||
release=1
|
||||
source=(https://code.videolan.org/videolan/libplacebo/-/archive/v$version/$name-v$version.tar.gz)
|
||||
release=2
|
||||
source=(https://code.videolan.org/videolan/libplacebo/-/archive/v$version/$name-v$version.tar.gz
|
||||
glslang_header_include_path.patch)
|
||||
|
||||
build() {
|
||||
patch -d $name-v$version -p1 -i $SRC/glslang_header_include_path.patch
|
||||
|
||||
CXXFLAGS+=" -I/usr/include/glslang" \
|
||||
meson build $name-v$version \
|
||||
meson setup build $name-v$version \
|
||||
--prefix=/usr \
|
||||
--buildtype=plain \
|
||||
-D b_ndebug=true \
|
||||
-D vulkan=enabled \
|
||||
-D glslang=enabled \
|
||||
-D shaderc=enabled \
|
||||
-D lcms=enabled
|
||||
|
||||
ninja -C build -j ${JOBS:-1}
|
||||
DESTDIR=$PKG ninja -C build install
|
||||
meson compile -C build -j ${JOBS:-1}
|
||||
DESTDIR=$PKG meson install -C build
|
||||
}
|
||||
|
72
libplacebo/glslang_header_include_path.patch
Normal file
72
libplacebo/glslang_header_include_path.patch
Normal file
@ -0,0 +1,72 @@
|
||||
diff -pruN libplacebo-v2.72.0.orig/src/glsl/glslang.cc libplacebo-v2.72.0/src/glsl/glslang.cc
|
||||
--- libplacebo-v2.72.0.orig/src/glsl/glslang.cc 2020-11-08 18:06:34.161048329 +1100
|
||||
+++ libplacebo-v2.72.0/src/glsl/glslang.cc 2020-11-08 18:07:28.970375008 +1100
|
||||
@@ -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_compil
|
||||
if (api_ver >= EShTargetVulkan_1_1)
|
||||
spirv_version = EShTargetSpv_1_3;
|
||||
|
||||
-#if GLSLANG_PATCH_LEVEL >= 3667
|
||||
+#if GLSLANG_VERSION_MAJOR >= 11
|
||||
if (api_ver >= EShTargetVulkan_1_2)
|
||||
spirv_version = EShTargetSpv_1_5;
|
||||
#endif
|
||||
@@ -200,7 +200,7 @@ const TBuiltInResource DefaultTBuiltInRe
|
||||
/* .MaxCullDistances = */ 8,
|
||||
/* .MaxCombinedClipAndCullDistances = */ 8,
|
||||
/* .MaxSamples = */ 4,
|
||||
-#if GLSLANG_PATCH_LEVEL >= 2892
|
||||
+#if GLSLANG_VERSION_MAJOR >= 11
|
||||
/* .maxMeshOutputVerticesNV = */ 256,
|
||||
/* .maxMeshOutputPrimitivesNV = */ 512,
|
||||
/* .maxMeshWorkGroupSizeX_NV = */ 32,
|
||||
@@ -211,6 +211,9 @@ const TBuiltInResource DefaultTBuiltInRe
|
||||
/* .maxTaskWorkGroupSizeZ_NV = */ 1,
|
||||
/* .maxMeshViewCountNV = */ 4,
|
||||
#endif
|
||||
+#if GLSLANG_VERSION_MAJOR >= 11
|
||||
+ /* .maxDualSourceDrawBuffersEXT = */ 1,
|
||||
+#endif
|
||||
|
||||
/* .limits = */ {
|
||||
/* .nonInductiveForLoops = */ 1,
|
||||
diff -pruN libplacebo-v2.72.0.orig/src/meson.build libplacebo-v2.72.0/src/meson.build
|
||||
--- libplacebo-v2.72.0.orig/src/meson.build 2020-11-08 18:06:34.161048329 +1100
|
||||
+++ libplacebo-v2.72.0/src/meson.build 2020-11-08 18:06:43.350935445 +1100
|
||||
@@ -49,7 +49,7 @@ endif
|
||||
|
||||
# work-arounds for glslang braindeath
|
||||
glslang_combined = disabler()
|
||||
-glslang_min_ver = 2763
|
||||
+glslang_min_ver = 11
|
||||
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
|
Loading…
x
Reference in New Issue
Block a user