summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2021-11-14 08:52:34 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-11-15 12:55:27 +0000
commita8f34f0110be9da92dd89439d7c4b995a7601ef1 (patch)
tree81374e3668c9f09992718cb420f62177837f6b76 /meta/recipes-graphics
parentd3a5074c67ba947e373714b2e3ff892d09e28290 (diff)
downloadpoky-a8f34f0110be9da92dd89439d7c4b995a7601ef1.tar.gz
vulkan-samples: Fix cmake errors about plain signature
Fix some typecasting errors seen on 32bit platforms with clang (From OE-Core rev: f37d209220e2393384facf676f33fb7c68ab11e6) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics')
-rw-r--r--meta/recipes-graphics/vulkan/vulkan-samples/0001-framework-core-Add-explicit-static_cast-from-vk-Buff.patch35
-rw-r--r--meta/recipes-graphics/vulkan/vulkan-samples/0001-framework-do-not-mix-plain-and-keyword-target_link_l.patch38
-rw-r--r--meta/recipes-graphics/vulkan/vulkan-samples_git.bb2
3 files changed, 75 insertions, 0 deletions
diff --git a/meta/recipes-graphics/vulkan/vulkan-samples/0001-framework-core-Add-explicit-static_cast-from-vk-Buff.patch b/meta/recipes-graphics/vulkan/vulkan-samples/0001-framework-core-Add-explicit-static_cast-from-vk-Buff.patch
new file mode 100644
index 0000000000..b0e7cdabe4
--- /dev/null
+++ b/meta/recipes-graphics/vulkan/vulkan-samples/0001-framework-core-Add-explicit-static_cast-from-vk-Buff.patch
@@ -0,0 +1,35 @@
1From f88fd472e57b59013570f08949dbbc0875c1bae4 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 13 Nov 2021 18:37:13 -0800
4Subject: [PATCH] framework/core: Add explicit static_cast from vk::Buffer to
5 VkBuffer
6
7This fixes errors like
8framework/core/hpp_buffer.cpp:149:3: error: no matching function for call to 'vmaDestroyBuffer'
9| vmaDestroyBuffer(vmaAllocator, handle, vmaAllocation);
10| ^~~~~~~~~~~~~~~~
11| /mnt/b/yoe/master/build/tmp/work/riscv32-yoe-linux-musl/vulkan-samples/git-r0/git/third_party/vma/src/vk_mem_alloc.h:3803:33: note: candidate function not viable: no known conversion from 'vk::Buffer' to 'V
12kBuffer' (aka 'unsigned long long') for 2nd argument
13
14Upstream-Status: Submitted [https://github.com/KhronosGroup/Vulkan-Samples/pull/395]
15Signed-off-by: Khem Raj <raj.khem@gmail.com>
16---
17 framework/core/hpp_buffer.cpp | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-)
19
20diff --git a/framework/core/hpp_buffer.cpp b/framework/core/hpp_buffer.cpp
21index c1f5649..2609e4e 100644
22--- a/framework/core/hpp_buffer.cpp
23+++ b/framework/core/hpp_buffer.cpp
24@@ -146,7 +146,7 @@ void HPPBuffer::destroy()
25 {
26 assert(vmaAllocation != VK_NULL_HANDLE);
27 unmap();
28- vmaDestroyBuffer(vmaAllocator, handle, vmaAllocation);
29+ vmaDestroyBuffer(vmaAllocator, static_cast<VkBuffer>(handle), vmaAllocation);
30 }
31 }
32
33--
342.33.1
35
diff --git a/meta/recipes-graphics/vulkan/vulkan-samples/0001-framework-do-not-mix-plain-and-keyword-target_link_l.patch b/meta/recipes-graphics/vulkan/vulkan-samples/0001-framework-do-not-mix-plain-and-keyword-target_link_l.patch
new file mode 100644
index 0000000000..66ed8bb47d
--- /dev/null
+++ b/meta/recipes-graphics/vulkan/vulkan-samples/0001-framework-do-not-mix-plain-and-keyword-target_link_l.patch
@@ -0,0 +1,38 @@
1From 64b806ab702a6f445fd84aca5f03bb85b86a66e3 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 11 Nov 2021 18:37:09 -0800
4Subject: [PATCH] framework: do not mix plain and keyword
5 target_link_libraries() signatures
6
7Fixes
8| CMake Error at framework/CMakeLists.txt:461 (target_link_libraries):
9| The plain signature for target_link_libraries has already been used with
10| the target "framework". All uses of target_link_libraries with a target | must be either all-keyword or all-plain.
11|
12| The uses of the plain signature are here:
13| | * framework/CMakeLists.txt:453 (target_link_libraries)
14|
15
16Upstream-Status: Submitted [https://github.com/KhronosGroup/Vulkan-Samples/pull/395]
17
18Signed-off-by: Khem Raj <raj.khem@gmail.com>
19---
20 framework/CMakeLists.txt | 2 +-
21 1 file changed, 1 insertion(+), 1 deletion(-)
22
23diff --git a/framework/CMakeLists.txt b/framework/CMakeLists.txt
24index 948c796..13d3324 100644
25--- a/framework/CMakeLists.txt
26+++ b/framework/CMakeLists.txt
27@@ -450,7 +450,7 @@ target_link_libraries(${PROJECT_NAME} PUBLIC
28 plugins)
29
30 if(${NEED_LINK_ATOMIC})
31- target_link_libraries(${PROJECT_NAME} atomic)
32+ target_link_libraries(${PROJECT_NAME} PUBLIC atomic)
33 endif()
34
35 # Link platform specific libraries
36--
372.33.1
38
diff --git a/meta/recipes-graphics/vulkan/vulkan-samples_git.bb b/meta/recipes-graphics/vulkan/vulkan-samples_git.bb
index 613ed592c6..81d8c6faf9 100644
--- a/meta/recipes-graphics/vulkan/vulkan-samples_git.bb
+++ b/meta/recipes-graphics/vulkan/vulkan-samples_git.bb
@@ -7,6 +7,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=48aa35cefb768436223a6e7f18dc2a2a"
7 7
8SRC_URI = "gitsm://github.com/KhronosGroup/Vulkan-Samples.git;branch=master;protocol=https \ 8SRC_URI = "gitsm://github.com/KhronosGroup/Vulkan-Samples.git;branch=master;protocol=https \
9 file://0001-CMakeLists.txt-do-not-hardcode-lib-as-installation-t.patch \ 9 file://0001-CMakeLists.txt-do-not-hardcode-lib-as-installation-t.patch \
10 file://0001-framework-do-not-mix-plain-and-keyword-target_link_l.patch \
11 file://0001-framework-core-Add-explicit-static_cast-from-vk-Buff.patch \
10 file://debugfix.patch \ 12 file://debugfix.patch \
11 " 13 "
12 14