summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kanavin <alex@linutronix.de>2025-04-07 11:40:34 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-04-10 11:05:34 +0100
commit4152cfea3fab47f910cf76bc0f4c774e9e592a62 (patch)
tree8a08eec797097e5067be20f698498f8463b0d5d1
parent183e7414d1925dd08f3ae0594b63dc92bd4abf41 (diff)
downloadpoky-4152cfea3fab47f910cf76bc0f4c774e9e592a62.tar.gz
vulkan-samples: rewrite and submit reproducubility patch upstream
At some point the problematic define ceased to be used anywhere, and so we can simply patch it out (and remove the associated option setting from the recipe). (From OE-Core rev: 4acbb1b92b9e51d6a741458d6cbd0c48ab55f6ca) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-graphics/vulkan/vulkan-samples/0001-framework-Include-stdint.h.patch2
-rw-r--r--meta/recipes-graphics/vulkan/vulkan-samples/0001-vulkan-samples-Fix-reproducibility-issue.patch43
-rw-r--r--meta/recipes-graphics/vulkan/vulkan-samples/0003-bldsys-cmake-global_options.cmake-removed-unused-ROO.patch30
-rw-r--r--meta/recipes-graphics/vulkan/vulkan-samples_git.bb8
4 files changed, 32 insertions, 51 deletions
diff --git a/meta/recipes-graphics/vulkan/vulkan-samples/0001-framework-Include-stdint.h.patch b/meta/recipes-graphics/vulkan/vulkan-samples/0001-framework-Include-stdint.h.patch
index 8d323f2cef..b30b0e0017 100644
--- a/meta/recipes-graphics/vulkan/vulkan-samples/0001-framework-Include-stdint.h.patch
+++ b/meta/recipes-graphics/vulkan/vulkan-samples/0001-framework-Include-stdint.h.patch
@@ -1,4 +1,4 @@
1From 445fcfd7b9245881d769880a5942ce9faa893045 Mon Sep 17 00:00:00 2001 1From 9a187d2f54d3683636b951a10c165d949b3a1d18 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 23 Mar 2025 20:09:35 -0700 3Date: Sun, 23 Mar 2025 20:09:35 -0700
4Subject: [PATCH] framework: Include stdint.h 4Subject: [PATCH] framework: Include stdint.h
diff --git a/meta/recipes-graphics/vulkan/vulkan-samples/0001-vulkan-samples-Fix-reproducibility-issue.patch b/meta/recipes-graphics/vulkan/vulkan-samples/0001-vulkan-samples-Fix-reproducibility-issue.patch
deleted file mode 100644
index c16e05112f..0000000000
--- a/meta/recipes-graphics/vulkan/vulkan-samples/0001-vulkan-samples-Fix-reproducibility-issue.patch
+++ /dev/null
@@ -1,43 +0,0 @@
1From d998c753254649c7cf7c64e3fed78e41c11ad7ed Mon Sep 17 00:00:00 2001
2From: Richard Purdie <richard.purdie@linuxfoundation.org>
3Date: Wed, 23 Aug 2023 09:38:37 +0200
4Subject: [PATCH] vulkan-samples: Fix reproducibility issue
5
6There is code to remove the prefix CMAKE_SOURCE_DIR from __FILENAME__ paths
7used for logging with LOGE() in the code. We need to make this match the value we use
8in the debug source remapping from CFLAGS
9
10We export the right path to use in the recipe with:
11
12EXTRA_OECMAKE = "-DCMAKE_DEBUG_SRCDIR=${TARGET_DBGSRC_DIR}/"
13
14and we then patch this into the code instead of the broken use
15of CMAKE_SOURCE_DIR since __FILENAME__ will match our path prefix
16changes.
17
18This also breaks reproducibility since the path length of the build directory
19will currently change the output!
20
21Upstream-Status: Pending [needs to be discussed upstream]
22Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
23
24Signed-off-by: Julien Stephan <jstephan@baylibre.com>
25---
26 bldsys/cmake/global_options.cmake | 2 +-
27 1 file changed, 1 insertion(+), 1 deletion(-)
28
29diff --git a/bldsys/cmake/global_options.cmake b/bldsys/cmake/global_options.cmake
30index b15c2da..d8952e5 100644
31--- a/bldsys/cmake/global_options.cmake
32+++ b/bldsys/cmake/global_options.cmake
33@@ -62,7 +62,7 @@ set(CMAKE_CXX_STANDARD 14)
34 set(CMAKE_DISABLE_SOURCE_CHANGES ON)
35 set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)
36
37-string(LENGTH "${CMAKE_SOURCE_DIR}/" ROOT_PATH_SIZE)
38+string(LENGTH "${CMAKE_DEBUG_SRCDIR}/" ROOT_PATH_SIZE)
39 add_definitions(-DROOT_PATH_SIZE=${ROOT_PATH_SIZE})
40
41 set(CMAKE_C_FLAGS_DEBUG "-DDEBUG=0 ${CMAKE_C_FLAGS_DEBUG}")
42--
432.41.0
diff --git a/meta/recipes-graphics/vulkan/vulkan-samples/0003-bldsys-cmake-global_options.cmake-removed-unused-ROO.patch b/meta/recipes-graphics/vulkan/vulkan-samples/0003-bldsys-cmake-global_options.cmake-removed-unused-ROO.patch
new file mode 100644
index 0000000000..ffac2d78ce
--- /dev/null
+++ b/meta/recipes-graphics/vulkan/vulkan-samples/0003-bldsys-cmake-global_options.cmake-removed-unused-ROO.patch
@@ -0,0 +1,30 @@
1From da4ef211810bc3b0c51ea89f02c031a170fe0cb8 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de>
3Date: Tue, 1 Apr 2025 18:53:34 +0200
4Subject: [PATCH] bldsys/cmake/global_options.cmake: removed unused
5 ROOT_PATH_SIZE define
6
7After various refactorings it is no longer used anywhere (and
8is problematic for build reproducibility, as build path sizes can
9differ between build hosts).
10
11Upstream-Status: Submitted [https://github.com/KhronosGroup/Vulkan-Samples/pull/1325]
12Signed-off-by: Alexander Kanavin <alex@linutronix.de>
13---
14 bldsys/cmake/global_options.cmake | 3 ---
15 1 file changed, 3 deletions(-)
16
17diff --git a/bldsys/cmake/global_options.cmake b/bldsys/cmake/global_options.cmake
18index 96c7add..67a6c5e 100644
19--- a/bldsys/cmake/global_options.cmake
20+++ b/bldsys/cmake/global_options.cmake
21@@ -126,9 +126,6 @@ set(CMAKE_CXX_STANDARD 17)
22 set(CMAKE_DISABLE_SOURCE_CHANGES ON)
23 set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)
24
25-string(LENGTH "${CMAKE_SOURCE_DIR}/" ROOT_PATH_SIZE)
26-add_definitions(-DROOT_PATH_SIZE=${ROOT_PATH_SIZE})
27-
28 set(CMAKE_C_FLAGS_DEBUG "-DDEBUG=0 ${CMAKE_C_FLAGS_DEBUG}")
29 set(CMAKE_CXX_FLAGS_DEBUG "-DDEBUG=0 ${CMAKE_CXX_FLAGS_DEBUG}")
30
diff --git a/meta/recipes-graphics/vulkan/vulkan-samples_git.bb b/meta/recipes-graphics/vulkan/vulkan-samples_git.bb
index 75174f6a91..554e6eb290 100644
--- a/meta/recipes-graphics/vulkan/vulkan-samples_git.bb
+++ b/meta/recipes-graphics/vulkan/vulkan-samples_git.bb
@@ -6,9 +6,9 @@ LICENSE = "Apache-2.0"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=48aa35cefb768436223a6e7f18dc2a2a" 6LIC_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 \
10 file://0001-SPIRV-SpvBuilder.h-add-missing-cstdint-include.patch;patchdir=third_party/glslang \ 9 file://0001-SPIRV-SpvBuilder.h-add-missing-cstdint-include.patch;patchdir=third_party/glslang \
11 file://0001-framework-Include-stdint.h.patch \ 10 file://0001-framework-Include-stdint.h.patch \
11 file://0003-bldsys-cmake-global_options.cmake-removed-unused-ROO.patch \
12 " 12 "
13 13
14UPSTREAM_CHECK_COMMITS = "1" 14UPSTREAM_CHECK_COMMITS = "1"
@@ -25,12 +25,6 @@ inherit cmake features_check
25 25
26FILES:${PN} += "${datadir}" 26FILES:${PN} += "${datadir}"
27 27
28#
29# There is code to remove the prefix CMAKE_SOURCE_DIR from __FILENAME__ paths
30# used for logging with LOGE in the code. We need to make this match the value we use
31# in the debug source remapping from CFLAGS
32#
33EXTRA_OECMAKE += "-DCMAKE_DEBUG_SRCDIR=${TARGET_DBGSRC_DIR}/"
34# Binaries built with PCH enabled don't appear reproducible, differing results were seen 28# Binaries built with PCH enabled don't appear reproducible, differing results were seen
35# from some builds depending on the point the PCH was compiled. Disable it to be 29# from some builds depending on the point the PCH was compiled. Disable it to be
36# deterministic 30# deterministic