summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/vulkan
diff options
context:
space:
mode:
authorAlexander Kanavin <alex@linutronix.de>2024-08-27 07:23:39 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-08-28 09:14:27 +0100
commitbd048df594f0269bebef4505d365c772fc206852 (patch)
tree8125fe9fe22632e9f7434ce46252964fdc8bd0e3 /meta/recipes-graphics/vulkan
parent4c2090daf2947373c81aeb4db9a578bf2ae2708d (diff)
downloadpoky-bd048df594f0269bebef4505d365c772fc206852.tar.gz
vulkan-samples: update to latest revision
Drop backports. This has again regressed on 32 bit x86, and as no one cares upstream and the 32 bit x86 platform really isn't relevant for vulkan, let's just disable it there. (From OE-Core rev: 0f1968aeb5035d434e2494f71f3260b6b6b17b8d) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics/vulkan')
-rw-r--r--meta/recipes-graphics/vulkan/vulkan-samples/0001-Deprecate-u8string_view.patch59
-rw-r--r--meta/recipes-graphics/vulkan/vulkan-samples/0001-Do-not-use-LFS64-functions-on-linux-musl.patch37
-rw-r--r--meta/recipes-graphics/vulkan/vulkan-samples/32bit.patch101
-rw-r--r--meta/recipes-graphics/vulkan/vulkan-samples_git.bb7
4 files changed, 3 insertions, 201 deletions
diff --git a/meta/recipes-graphics/vulkan/vulkan-samples/0001-Deprecate-u8string_view.patch b/meta/recipes-graphics/vulkan/vulkan-samples/0001-Deprecate-u8string_view.patch
deleted file mode 100644
index c2304bdd48..0000000000
--- a/meta/recipes-graphics/vulkan/vulkan-samples/0001-Deprecate-u8string_view.patch
+++ /dev/null
@@ -1,59 +0,0 @@
1From 93987b1ce7d6f91387202495aac61026070597df Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 15 Jan 2023 21:37:52 -0800
4Subject: [PATCH] Deprecate u8string_view
5
6Use basic_string_view instead
7
8Upstream-Status: Backport [https://github.com/fmtlib/fmt/commit/dea7fde8b7d649923dd41b0766bdf076033c62a2]
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11 include/spdlog/fmt/bundled/core.h | 3 ++-
12 include/spdlog/fmt/bundled/format.h | 15 ++-------------
13 2 files changed, 4 insertions(+), 14 deletions(-)
14
15diff --git a/include/spdlog/fmt/bundled/core.h b/include/spdlog/fmt/bundled/core.h
16index 50b79351..e8b029ef 100644
17--- a/include/spdlog/fmt/bundled/core.h
18+++ b/include/spdlog/fmt/bundled/core.h
19@@ -1484,7 +1484,8 @@ FMT_API void vprint(wstring_view format_str, wformat_args args);
20
21 /**
22 \rst
23- Prints formatted data to ``stdout``.
24+ Formats ``args`` according to specifications in ``format_str`` and writes the
25+ output to ``stdout``.
26
27 **Example**::
28
29diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h
30index 1bb24a52..39426361 100644
31--- a/include/spdlog/fmt/bundled/format.h
32+++ b/include/spdlog/fmt/bundled/format.h
33@@ -407,21 +407,10 @@ void basic_buffer<T>::append(const U *begin, const U *end) {
34 enum char8_t: unsigned char {};
35 #endif
36
37-// A UTF-8 string view.
38-class u8string_view : public basic_string_view<char8_t> {
39- public:
40- typedef char8_t char_type;
41-
42- u8string_view(const char *s):
43- basic_string_view<char8_t>(reinterpret_cast<const char8_t*>(s)) {}
44- u8string_view(const char *s, size_t count) FMT_NOEXCEPT:
45- basic_string_view<char8_t>(reinterpret_cast<const char8_t*>(s), count) {}
46-};
47-
48 #if FMT_USE_USER_DEFINED_LITERALS
49 inline namespace literals {
50-inline u8string_view operator"" _u(const char *s, std::size_t n) {
51- return {s, n};
52+inline basic_string_view<char8_t> operator"" _u(const char* s, std::size_t n) {
53+ return {reinterpret_cast<const char8_t*>(s), n};
54 }
55 }
56 #endif
57--
582.39.0
59
diff --git a/meta/recipes-graphics/vulkan/vulkan-samples/0001-Do-not-use-LFS64-functions-on-linux-musl.patch b/meta/recipes-graphics/vulkan/vulkan-samples/0001-Do-not-use-LFS64-functions-on-linux-musl.patch
deleted file mode 100644
index f2bd7e510b..0000000000
--- a/meta/recipes-graphics/vulkan/vulkan-samples/0001-Do-not-use-LFS64-functions-on-linux-musl.patch
+++ /dev/null
@@ -1,37 +0,0 @@
1From ce7a593e74c8e0c2ece15c73e7614d4f13a19a53 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 30 Dec 2022 13:04:08 -0800
4Subject: [PATCH] Do not use LFS64 functions on linux/musl
5
6On musl, off_t is 64bit always ( even on 32bit platforms ), therefore using
7LFS64 funcitons is not needed on such platforms. Moreover, musl has stopped
8providing aliases for these functions [1] which means it wont compile on
9newer musl systems. Therefore only use it on 32bit glibc/linux platforms
10and exclude musl like cygwin or OSX
11
12[1] https://git.musl-libc.org/cgit/musl/commit/?id=246f1c811448f37a44b41cd8df8d0ef9736d95f4
13
14Upstream-Status: Submitted [https://github.com/gabime/spdlog/pull/2589]
15Signed-off-by: Khem Raj <raj.khem@gmail.com>
16---
17 include/spdlog/details/os.h | 4 +++-
18 1 file changed, 3 insertions(+), 1 deletion(-)
19
20diff --git a/include/spdlog/details/os.h b/include/spdlog/details/os.h
21index 8e8476f0..be0a67b8 100644
22--- a/include/spdlog/details/os.h
23+++ b/include/spdlog/details/os.h
24@@ -227,7 +227,9 @@ inline size_t filesize(FILE *f)
25 #else // unix
26 int fd = fileno(f);
27 // 64 bits(but not in osx or cygwin, where fstat64 is deprecated)
28-#if !defined(__FreeBSD__) && !defined(__APPLE__) && (defined(__x86_64__) || defined(__ppc64__)) && !defined(__CYGWIN__)
29+#if !defined(__FreeBSD__) && !defined(__APPLE__) && \
30+ (defined(__linux__) && defined(__GLIBC__)) && \
31+ (defined(__x86_64__) || defined(__ppc64__)) && !defined(__CYGWIN__)
32 struct stat64 st;
33 if (::fstat64(fd, &st) == 0)
34 {
35--
362.39.0
37
diff --git a/meta/recipes-graphics/vulkan/vulkan-samples/32bit.patch b/meta/recipes-graphics/vulkan/vulkan-samples/32bit.patch
deleted file mode 100644
index 644c3b6167..0000000000
--- a/meta/recipes-graphics/vulkan/vulkan-samples/32bit.patch
+++ /dev/null
@@ -1,101 +0,0 @@
1From 49761ca63797014223d8e3ff6fb2c0235803c19c Mon Sep 17 00:00:00 2001
2From: asuessenbach <asuessenbach@nvidia.com>
3Date: Wed, 3 May 2023 09:50:08 +0200
4Subject: [PATCH] Resolve some Vulkan-Hpp-related issues on Win32.
5
6This patch fixes vulkan-samples compilation on 32-bit hosts.
7
8Upstream-Status: Backport
9Signed-off-by: Ross Burton <ross.burton@arm.com>
10
11---
12 framework/common/hpp_vk_common.h | 4 ++--
13 framework/core/hpp_buffer.cpp | 4 ++--
14 framework/core/hpp_buffer.h | 2 +-
15 framework/core/hpp_image.cpp | 2 +-
16 samples/api/hpp_texture_loading/hpp_texture_loading.cpp | 2 +-
17 5 files changed, 7 insertions(+), 7 deletions(-)
18
19diff --git a/framework/common/hpp_vk_common.h b/framework/common/hpp_vk_common.h
20index 39ed3dcde..0cbbe479e 100644
21--- a/framework/common/hpp_vk_common.h
22+++ b/framework/common/hpp_vk_common.h
23@@ -92,7 +92,7 @@ inline bool is_dynamic_buffer_descriptor_type(vk::DescriptorType descriptor_type
24
25 inline vk::ShaderModule load_shader(const std::string &filename, vk::Device device, vk::ShaderStageFlagBits stage)
26 {
27- return vkb::load_shader(filename, device, static_cast<VkShaderStageFlagBits>(stage));
28+ return static_cast<vk::ShaderModule>(vkb::load_shader(filename, device, static_cast<VkShaderStageFlagBits>(stage)));
29 }
30
31 inline void set_image_layout(vk::CommandBuffer command_buffer,
32@@ -104,7 +104,7 @@ inline void set_image_layout(vk::CommandBuffer command_buffer,
33 vk::PipelineStageFlags dst_mask = vk::PipelineStageFlagBits::eAllCommands)
34 {
35 vkb::set_image_layout(command_buffer,
36- image,
37+ static_cast<VkImage>(image),
38 static_cast<VkImageLayout>(old_layout),
39 static_cast<VkImageLayout>(new_layout),
40 static_cast<VkImageSubresourceRange>(subresource_range),
41diff --git a/framework/core/hpp_buffer.cpp b/framework/core/hpp_buffer.cpp
42index 8da265acb..e6509b9f4 100644
43--- a/framework/core/hpp_buffer.cpp
44+++ b/framework/core/hpp_buffer.cpp
45@@ -84,7 +84,7 @@ HPPBuffer::~HPPBuffer()
46 if (get_handle() && (allocation != VK_NULL_HANDLE))
47 {
48 unmap();
49- vmaDestroyBuffer(get_device().get_memory_allocator(), get_handle(), allocation);
50+ vmaDestroyBuffer(get_device().get_memory_allocator(), static_cast<VkBuffer>(get_handle()), allocation);
51 }
52 }
53
54@@ -93,7 +93,7 @@ VmaAllocation HPPBuffer::get_allocation() const
55 return allocation;
56 }
57
58-VkDeviceMemory HPPBuffer::get_memory() const
59+vk::DeviceMemory HPPBuffer::get_memory() const
60 {
61 return memory;
62 }
63diff --git a/framework/core/hpp_buffer.h b/framework/core/hpp_buffer.h
64index 7a243c265..bad47406d 100644
65--- a/framework/core/hpp_buffer.h
66+++ b/framework/core/hpp_buffer.h
67@@ -55,7 +55,7 @@ class HPPBuffer : public vkb::core::HPPVulkanResource<vk::Buffer>
68
69 VmaAllocation get_allocation() const;
70 const uint8_t *get_data() const;
71- VkDeviceMemory get_memory() const;
72+ vk::DeviceMemory get_memory() const;
73
74 /**
75 * @return Return the buffer's device address (note: requires that the buffer has been created with the VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT usage fla)
76diff --git a/framework/core/hpp_image.cpp b/framework/core/hpp_image.cpp
77index 00fa89ba7..5e6f27363 100644
78--- a/framework/core/hpp_image.cpp
79+++ b/framework/core/hpp_image.cpp
80@@ -138,7 +138,7 @@ HPPImage::~HPPImage()
81 if (get_handle() && memory)
82 {
83 unmap();
84- vmaDestroyImage(get_device().get_memory_allocator(), get_handle(), memory);
85+ vmaDestroyImage(get_device().get_memory_allocator(), static_cast<VkImage>(get_handle()), memory);
86 }
87 }
88
89diff --git a/samples/api/hpp_texture_loading/hpp_texture_loading.cpp b/samples/api/hpp_texture_loading/hpp_texture_loading.cpp
90index 11a1f24c1..cbdd22773 100644
91--- a/samples/api/hpp_texture_loading/hpp_texture_loading.cpp
92+++ b/samples/api/hpp_texture_loading/hpp_texture_loading.cpp
93@@ -170,7 +170,7 @@ void HPPTextureLoading::load_texture()
94 memory_allocate_info = {memory_requirements.size,
95 get_device()->get_gpu().get_memory_type(memory_requirements.memoryTypeBits, vk::MemoryPropertyFlagBits::eDeviceLocal)};
96 texture.device_memory = get_device()->get_handle().allocateMemory(memory_allocate_info);
97- VK_CHECK(vkBindImageMemory(get_device()->get_handle(), texture.image, texture.device_memory, 0));
98+ get_device()->get_handle().bindImageMemory(texture.image, texture.device_memory, 0);
99
100 vk::CommandBuffer copy_command = get_device()->create_command_buffer(vk::CommandBufferLevel::ePrimary, true);
101
diff --git a/meta/recipes-graphics/vulkan/vulkan-samples_git.bb b/meta/recipes-graphics/vulkan/vulkan-samples_git.bb
index 4e688e44a7..93d4cdfdd9 100644
--- a/meta/recipes-graphics/vulkan/vulkan-samples_git.bb
+++ b/meta/recipes-graphics/vulkan/vulkan-samples_git.bb
@@ -7,14 +7,11 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=48aa35cefb768436223a6e7f18dc2a2a"
7 7
8SRC_URI = "gitsm://github.com/KhronosGroup/Vulkan-Samples.git;branch=main;protocol=https;lfs=0 \ 8SRC_URI = "gitsm://github.com/KhronosGroup/Vulkan-Samples.git;branch=main;protocol=https;lfs=0 \
9 file://0001-vulkan-samples-Fix-reproducibility-issue.patch \ 9 file://0001-vulkan-samples-Fix-reproducibility-issue.patch \
10 file://0001-Do-not-use-LFS64-functions-on-linux-musl.patch;patchdir=third_party/spdlog \
11 file://0001-Deprecate-u8string_view.patch;patchdir=third_party/spdlog \
12 file://32bit.patch \
13 file://0001-zstd.c-replace-FORCE_INLINE_TEMPLATE-with-inline.patch;patchdir=third_party/ktx \ 10 file://0001-zstd.c-replace-FORCE_INLINE_TEMPLATE-with-inline.patch;patchdir=third_party/ktx \
14 " 11 "
15 12
16UPSTREAM_CHECK_COMMITS = "1" 13UPSTREAM_CHECK_COMMITS = "1"
17SRCREV = "2307c3eb5608cb1205fa3514b3a31dbfb857d00c" 14SRCREV = "fdce530c029514e2f66296288f9ee26a05058ec1"
18 15
19UPSTREAM_CHECK_GITTAGREGEX = "These are not the releases you're looking for" 16UPSTREAM_CHECK_GITTAGREGEX = "These are not the releases you're looking for"
20S = "${WORKDIR}/git" 17S = "${WORKDIR}/git"
@@ -38,3 +35,5 @@ EXTRA_OECMAKE += "-DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON"
38 35
39# This needs to be specified explicitly to avoid xcb/xlib dependencies 36# This needs to be specified explicitly to avoid xcb/xlib dependencies
40EXTRA_OECMAKE += "-DVKB_WSI_SELECTION=D2D" 37EXTRA_OECMAKE += "-DVKB_WSI_SELECTION=D2D"
38
39COMPATIBLE_HOST:x86 = "null"