summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-graphics/vulkan/vulkan-samples/0001-zstd.c-replace-FORCE_INLINE_TEMPLATE-with-inline.patch52
-rw-r--r--meta/recipes-graphics/vulkan/vulkan-samples_git.bb1
2 files changed, 53 insertions, 0 deletions
diff --git a/meta/recipes-graphics/vulkan/vulkan-samples/0001-zstd.c-replace-FORCE_INLINE_TEMPLATE-with-inline.patch b/meta/recipes-graphics/vulkan/vulkan-samples/0001-zstd.c-replace-FORCE_INLINE_TEMPLATE-with-inline.patch
new file mode 100644
index 0000000000..22538d4119
--- /dev/null
+++ b/meta/recipes-graphics/vulkan/vulkan-samples/0001-zstd.c-replace-FORCE_INLINE_TEMPLATE-with-inline.patch
@@ -0,0 +1,52 @@
1From a7bfe82a311c713b12bb83b8488574ad5c784f89 Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com>
3Date: Tue, 9 Jul 2024 04:29:11 +0000
4Subject: [PATCH] zstd.c: replace FORCE_INLINE_TEMPLATE with inline
5
6Refer [1], always-inline is not suggested to be used if you have indirect
7+calls. so replace FORCE_INLINE_TEMPLATE with inline to fix error:
8In function 'ZSTD_compressBlock_lazy_generic',
9 inlined from 'ZSTD_compressBlock_greedy' at TOPDIR/tmp-glibc/work/core2-32-wrs-linux/vulkan-samples/git/git/third_party/ktx/lib/basisu/zstd/zstd.c:21914:12:
10TOPDIR/tmp-glibc/work/core2-32-wrs-linux/vulkan-samples/git/git/third_party/ktx/lib/basisu/zstd/zstd.c:21551:30: error: inlining failed in call to 'always_inline' 'ZSTD_HcFindBestMatch_selectMLS': function not considered for inlining
11 | FORCE_INLINE_TEMPLATE size_t ZSTD_HcFindBestMatch_selectMLS (
12 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13TOPDIR/tmp-glibc/work/core2-32-wrs-linux/vulkan-samples/git/git/third_party/ktx/lib/basisu/zstd/zstd.c:21736:32: note: called from here
14| size_t const ml2 = searchMax(ms, ip, iend, &offsetFound);
15
16Upstream-Status: Inappropriate [ Latest upstream ktx don't have this part code ]
17
18Has report this issue to upstream Vulkan-Samples, refer [2]
19
20[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107931
21[2] https://github.com/KhronosGroup/Vulkan-Samples/issues/1089
22
23Signed-off-by: Changqing Li <changqing.li@windriver.com>
24---
25 lib/basisu/zstd/zstd.c | 4 ++--
26 1 file changed, 2 insertions(+), 2 deletions(-)
27
28diff --git a/lib/basisu/zstd/zstd.c b/lib/basisu/zstd/zstd.c
29index eaf13738..423f149e 100644
30--- a/lib/basisu/zstd/zstd.c
31+++ b/lib/basisu/zstd/zstd.c
32@@ -21548,7 +21548,7 @@ size_t ZSTD_HcFindBestMatch_generic (
33 }
34
35
36-FORCE_INLINE_TEMPLATE size_t ZSTD_HcFindBestMatch_selectMLS (
37+static inline size_t ZSTD_HcFindBestMatch_selectMLS (
38 ZSTD_matchState_t* ms,
39 const BYTE* ip, const BYTE* const iLimit,
40 size_t* offsetPtr)
41@@ -21596,7 +21596,7 @@ static size_t ZSTD_HcFindBestMatch_dedicatedDictSearch_selectMLS (
42 }
43
44
45-FORCE_INLINE_TEMPLATE size_t ZSTD_HcFindBestMatch_extDict_selectMLS (
46+static inline size_t ZSTD_HcFindBestMatch_extDict_selectMLS (
47 ZSTD_matchState_t* ms,
48 const BYTE* ip, const BYTE* const iLimit,
49 size_t* offsetPtr)
50--
512.44.0
52
diff --git a/meta/recipes-graphics/vulkan/vulkan-samples_git.bb b/meta/recipes-graphics/vulkan/vulkan-samples_git.bb
index d60c0f3190..4e688e44a7 100644
--- a/meta/recipes-graphics/vulkan/vulkan-samples_git.bb
+++ b/meta/recipes-graphics/vulkan/vulkan-samples_git.bb
@@ -10,6 +10,7 @@ SRC_URI = "gitsm://github.com/KhronosGroup/Vulkan-Samples.git;branch=main;protoc
10 file://0001-Do-not-use-LFS64-functions-on-linux-musl.patch;patchdir=third_party/spdlog \ 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 \ 11 file://0001-Deprecate-u8string_view.patch;patchdir=third_party/spdlog \
12 file://32bit.patch \ 12 file://32bit.patch \
13 file://0001-zstd.c-replace-FORCE_INLINE_TEMPLATE-with-inline.patch;patchdir=third_party/ktx \
13 " 14 "
14 15
15UPSTREAM_CHECK_COMMITS = "1" 16UPSTREAM_CHECK_COMMITS = "1"