aboutsummaryrefslogtreecommitdiff
path: root/graphics/libplacebo
diff options
context:
space:
mode:
authororbea <orbea@riseup.net>2020-06-08 10:52:10 -0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2020-06-14 17:45:53 +0700
commitd6e351f680ca11cf7f4212c7a206df05f241a82b (patch)
treedf8c8fc2fe58f566a5c4783a8ccce413a1547e99 /graphics/libplacebo
parent67556053da3e27693c1e43afa99e6ed4a5363898 (diff)
graphics/libplacebo: Updated for version 2.43.1.
Signed-off-by: orbea <orbea@riseup.net> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'graphics/libplacebo')
-rw-r--r--graphics/libplacebo/glslang.patch18
-rw-r--r--graphics/libplacebo/libplacebo.SlackBuild10
-rw-r--r--graphics/libplacebo/libplacebo.info6
-rw-r--r--graphics/libplacebo/vulkan.patch59
4 files changed, 89 insertions, 4 deletions
diff --git a/graphics/libplacebo/glslang.patch b/graphics/libplacebo/glslang.patch
new file mode 100644
index 0000000000000..cfeb61bf4ec73
--- /dev/null
+++ b/graphics/libplacebo/glslang.patch
@@ -0,0 +1,18 @@
+commit 87e11a7e57ec734059924e192656fc70d1ce3f50
+Author: orbea <orbea@riseup.net>
+Date: Mon Jun 8 10:29:26 2020 -0700
+
+ Fix build with newer glslang.
+
+diff --git a/src/glsl/glslang.cc b/src/glsl/glslang.cc
+index 5546120..07cf8f1 100644
+--- a/src/glsl/glslang.cc
++++ b/src/glsl/glslang.cc
+@@ -210,6 +210,7 @@ const TBuiltInResource DefaultTBuiltInResource = {
+ /* .maxTaskWorkGroupSizeY_NV = */ 1,
+ /* .maxTaskWorkGroupSizeZ_NV = */ 1,
+ /* .maxMeshViewCountNV = */ 4,
++ /* .maxDualSourceDrawBuffersEXT = */ 1,
+ #endif
+
+ /* .limits = */ {
diff --git a/graphics/libplacebo/libplacebo.SlackBuild b/graphics/libplacebo/libplacebo.SlackBuild
index d15c8a61322b7..64f78d87820bd 100644
--- a/graphics/libplacebo/libplacebo.SlackBuild
+++ b/graphics/libplacebo/libplacebo.SlackBuild
@@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=libplacebo
-VERSION=${VERSION:-1.29.1}
+VERSION=${VERSION:-2.43.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -78,6 +78,14 @@ else
RELEASE=plain
fi
+# Fix the build with newer glslang versions.
+patch -p1 < $CWD/glslang.patch
+
+# vulkan: get rid of deprecated enum members
+# https://code.videolan.org/videolan/libplacebo/-/issues/71
+# https://code.videolan.org/videolan/libplacebo/-/commit/45e19e7bbbbfceb197d8826c775e16ef536a4565
+patch -p1 < $CWD/vulkan.patch
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
meson \
diff --git a/graphics/libplacebo/libplacebo.info b/graphics/libplacebo/libplacebo.info
index 2fd1e1161590c..fe87940ce7125 100644
--- a/graphics/libplacebo/libplacebo.info
+++ b/graphics/libplacebo/libplacebo.info
@@ -1,8 +1,8 @@
PRGNAM="libplacebo"
-VERSION="1.29.1"
+VERSION="2.43.1"
HOMEPAGE="https://code.videolan.org/videolan/libplacebo"
-DOWNLOAD="https://code.videolan.org/videolan/libplacebo/-/archive/v1.29.1/libplacebo-v1.29.1.tar.gz"
-MD5SUM="07815068c92280858a073400f5b6837d"
+DOWNLOAD="https://code.videolan.org/videolan/libplacebo/-/archive/v2.43.1/libplacebo-v2.43.1.tar.gz"
+MD5SUM="2d9cad6e8155eccaed6e612520a20793"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="meson vulkan-sdk"
diff --git a/graphics/libplacebo/vulkan.patch b/graphics/libplacebo/vulkan.patch
new file mode 100644
index 0000000000000..4d424ae310738
--- /dev/null
+++ b/graphics/libplacebo/vulkan.patch
@@ -0,0 +1,59 @@
+From 45e19e7bbbbfceb197d8826c775e16ef536a4565 Mon Sep 17 00:00:00 2001
+From: Niklas Haas <git@haasn.xyz>
+Date: Tue, 5 May 2020 00:13:49 +0200
+Subject: [PATCH] vulkan: get rid of deprecated enum members
+
+Maybe we should just get rid of the switch coverage check altogether. I
+wish we could somehow differentiate between enums defined in our code
+and enums defined externally.
+
+Fixes #71.
+---
+ src/vulkan/context.c | 4 +++-
+ src/vulkan/swapchain.c | 7 +------
+ 2 files changed, 4 insertions(+), 7 deletions(-)
+
+diff --git a/src/vulkan/context.c b/src/vulkan/context.c
+index 10928a9..14a57cf 100644
+--- a/src/vulkan/context.c
++++ b/src/vulkan/context.c
+@@ -685,7 +685,6 @@ VkPhysicalDevice pl_vulkan_choose_device(struct pl_context *ctx,
+ [VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU] = {"virtual", 3},
+ [VK_PHYSICAL_DEVICE_TYPE_CPU] = {"software", 2},
+ [VK_PHYSICAL_DEVICE_TYPE_OTHER] = {"other", 1},
+- [VK_PHYSICAL_DEVICE_TYPE_END_RANGE+1] = {0},
+ };
+
+ int best = 0;
+@@ -693,6 +692,9 @@ VkPhysicalDevice pl_vulkan_choose_device(struct pl_context *ctx,
+ VkPhysicalDeviceProperties props = {0};
+ GetPhysicalDeviceProperties(devices[i], &props);
+ VkPhysicalDeviceType t = props.deviceType;
++ if (t > PL_ARRAY_SIZE(types))
++ continue;
++
+ PL_INFO(vk, " GPU %d: %s (%s)", i, props.deviceName, types[t].name);
+
+ if (params->surface) {
+diff --git a/src/vulkan/swapchain.c b/src/vulkan/swapchain.c
+index bf6fd54..6bf40dd 100644
+--- a/src/vulkan/swapchain.c
++++ b/src/vulkan/swapchain.c
+@@ -138,13 +138,8 @@ static bool vk_map_color_space(VkColorSpaceKHR space, struct pl_color_space *out
+ return false;
+ #endif
+
+- // Included to satisfy the switch coverage check
+- case VK_COLOR_SPACE_RANGE_SIZE_KHR:
+- case VK_COLOR_SPACE_MAX_ENUM_KHR:
+- break;
++ default: return false;
+ }
+-
+- return false;
+ }
+
+ static bool pick_surf_format(const struct pl_gpu *gpu, const struct vk_ctx *vk,
+--
+2.26.2
+