diff options
Diffstat (limited to 'poky/meta/recipes-graphics/vulkan')
-rw-r--r-- | poky/meta/recipes-graphics/vulkan/vulkan-headers_1.2.162.0.bb | 4 | ||||
-rw-r--r-- | poky/meta/recipes-graphics/vulkan/vulkan-samples/0001-support-link-against-libatomic-if-no-built-in-atomic.patch | 117 | ||||
-rw-r--r-- | poky/meta/recipes-graphics/vulkan/vulkan-samples/debugfix.patch | 31 | ||||
-rw-r--r-- | poky/meta/recipes-graphics/vulkan/vulkan-samples_git.bb | 17 | ||||
-rw-r--r-- | poky/meta/recipes-graphics/vulkan/vulkan-tools_1.2.162.1.bb (renamed from poky/meta/recipes-graphics/vulkan/vulkan-tools_1.2.162.0.bb) | 3 |
5 files changed, 52 insertions, 120 deletions
diff --git a/poky/meta/recipes-graphics/vulkan/vulkan-headers_1.2.162.0.bb b/poky/meta/recipes-graphics/vulkan/vulkan-headers_1.2.162.0.bb index a28954ad7..19ae67cdd 100644 --- a/poky/meta/recipes-graphics/vulkan/vulkan-headers_1.2.162.0.bb +++ b/poky/meta/recipes-graphics/vulkan/vulkan-headers_1.2.162.0.bb @@ -1,4 +1,8 @@ SUMMARY = "Vulkan Header files and API registry" +DESCRIPTION = "Vulkan is a 3D graphics and compute API providing cross-platform access \ +to modern GPUs with low overhead and targeting realtime graphics applications such as \ +games and interactive media. This package contains the development headers \ +for packages wanting to make use of Vulkan." HOMEPAGE = "https://www.khronos.org/vulkan/" BUGTRACKER = "https://github.com/KhronosGroup/Vulkan-Headers" SECTION = "libs" diff --git a/poky/meta/recipes-graphics/vulkan/vulkan-samples/0001-support-link-against-libatomic-if-no-built-in-atomic.patch b/poky/meta/recipes-graphics/vulkan/vulkan-samples/0001-support-link-against-libatomic-if-no-built-in-atomic.patch deleted file mode 100644 index 6c0fb6086..000000000 --- a/poky/meta/recipes-graphics/vulkan/vulkan-samples/0001-support-link-against-libatomic-if-no-built-in-atomic.patch +++ /dev/null @@ -1,117 +0,0 @@ -From e20a5d13935a41a856e8f71c49f2cc9d81b1d92c Mon Sep 17 00:00:00 2001 -From: Changqing Li <changqing.li@windriver.com> -Date: Fri, 13 Nov 2020 17:07:00 +0800 -Subject: [PATCH] support link against libatomic if no built-in atomic exist - -fix error: -| framework/lib/ppc/libframework.a(device.cpp.o): in function `std::__atomic_base<unsigned long long>::load(std::memory_order) const': -| /usr/include/c++/10.2.0/bits/atomic_base.h:426: undefined reference to `__atomic_load_8' - -Upstream-Status: Submitted [https://github.com/KhronosGroup/Vulkan-Samples/pull/212] - -Signed-off-by: Changqing Li <changqing.li@windriver.com> ---- - CMakeLists.txt | 1 + - bldsys/cmake/check_atomic.cmake | 62 +++++++++++++++++++++++++++++++++ - framework/CMakeLists.txt | 4 +++ - 3 files changed, 67 insertions(+) - create mode 100644 bldsys/cmake/check_atomic.cmake - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index e72e829..466f51d 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -42,6 +42,7 @@ endmacro(vulkan_samples_pch) - include(utils) - include(global_options) - include(sample_helper) -+include(check_atomic) - - # Add third party libraries - add_subdirectory(third_party) -diff --git a/bldsys/cmake/check_atomic.cmake b/bldsys/cmake/check_atomic.cmake -new file mode 100644 -index 0000000..6b47a7a ---- /dev/null -+++ b/bldsys/cmake/check_atomic.cmake -@@ -0,0 +1,62 @@ -+# check weither need to link atomic library explicitly -+INCLUDE(CheckCXXSourceCompiles) -+INCLUDE(CheckLibraryExists) -+ -+if(NOT DEFINED VULKAN_COMPILER_IS_GCC_COMPATIBLE) -+ if(CMAKE_COMPILER_IS_GNUCXX) -+ set(VULKAN_COMPILER_IS_GCC_COMPATIBLE ON) -+ elseif( MSVC ) -+ set(VULKAN_COMPILER_IS_GCC_COMPATIBLE OFF) -+ elseif( "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" ) -+ set(VULKAN_COMPILER_IS_GCC_COMPATIBLE ON) -+ elseif( "${CMAKE_CXX_COMPILER_ID}" MATCHES "Intel" ) -+ set(VULKAN_COMPILER_IS_GCC_COMPATIBLE ON) -+ endif() -+endif() -+ -+# Sometimes linking against libatomic is required for atomic ops, if -+# the platform doesn't support lock-free atomics. -+ -+function(check_working_cxx_atomics varname) -+ set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS}) -+ set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -std=c++11") -+ CHECK_CXX_SOURCE_COMPILES(" -+#include <atomic> -+std::atomic<int> x; -+std::atomic<short> y; -+std::atomic<char> z; -+int main() { -+ ++z; -+ ++y; -+ return ++x; -+} -+" ${varname}) -+ set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS}) -+endfunction(check_working_cxx_atomics) -+ -+function(check_working_cxx_atomics64 varname) -+ set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS}) -+ set(CMAKE_REQUIRED_FLAGS "-std=c++11 ${CMAKE_REQUIRED_FLAGS}") -+ CHECK_CXX_SOURCE_COMPILES(" -+#include <atomic> -+#include <cstdint> -+std::atomic<uint64_t> x (0); -+int main() { -+ uint64_t i = x.load(std::memory_order_relaxed); -+ (void)i; -+ return 0; -+} -+" ${varname}) -+ set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS}) -+endfunction(check_working_cxx_atomics64) -+ -+set(NEED_LINK_ATOMIC OFF CACHE BOOL "weither need to link against atomic library") -+if(VULKAN_COMPILER_IS_GCC_COMPATIBLE) -+ # check if non-64-bit atomics work without the library. -+ check_working_cxx_atomics(HAVE_CXX_ATOMICS_WITHOUT_LIB) -+ # check 64-bit atomics work without the library. -+ check_working_cxx_atomics64(HAVE_CXX_ATOMICS64_WITHOUT_LIB) -+ if (NOT HAVE_CXX_ATOMICS_WITHOUT_LIB OR NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB) -+ set(NEED_LINK_ATOMIC ON CACHE BOOL "weither need to link to atomic library" FORCE) -+ endif() -+endif() -diff --git a/framework/CMakeLists.txt b/framework/CMakeLists.txt -index bf26786..322526e 100644 ---- a/framework/CMakeLists.txt -+++ b/framework/CMakeLists.txt -@@ -412,6 +412,10 @@ target_link_libraries(${PROJECT_NAME} - ctpl - docopt) - -+if(${NEED_LINK_ATOMIC}) -+ target_link_libraries(${PROJECT_NAME} atomic) -+endif() -+ - # Link platform specific libraries - if(ANDROID) - target_link_libraries(${PROJECT_NAME} log android native_app_glue) --- -2.17.1 - diff --git a/poky/meta/recipes-graphics/vulkan/vulkan-samples/debugfix.patch b/poky/meta/recipes-graphics/vulkan/vulkan-samples/debugfix.patch new file mode 100644 index 000000000..d723fcc19 --- /dev/null +++ b/poky/meta/recipes-graphics/vulkan/vulkan-samples/debugfix.patch @@ -0,0 +1,31 @@ +There is code to remove the prefix CMAKE_SOURCE_DIR from __FILENAME__ paths +used for logging with LOGE() in the code. We need to make this match the value we use +in the debug source remapping from CFLAGS + +We export the right path to use in the recipe with: + +EXTRA_OECMAKE = "-DCMAKE_DEBUG_SRCDIR=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/" + +and we then patch this into the code instead of the broken use +of CMAKE_SOURCE_DIR since __FILENAME__ will match our path prefix +changes. + +This also breaks reproducibility since the path length of the build directory +will currently change the output! + +Upstream-Status: Pending [needs to be discussed upstream] +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> + +Index: git/bldsys/cmake/global_options.cmake +=================================================================== +--- git.orig/bldsys/cmake/global_options.cmake ++++ git/bldsys/cmake/global_options.cmake +@@ -47,7 +47,7 @@ set(CMAKE_CXX_STANDARD 14) + set(CMAKE_DISABLE_SOURCE_CHANGES ON) + set(CMAKE_DISABLE_IN_SOURCE_BUILD ON) + +-string(LENGTH "${CMAKE_SOURCE_DIR}/" ROOT_PATH_SIZE) ++string(LENGTH "${CMAKE_DEBUG_SRCDIR}/" ROOT_PATH_SIZE) + add_definitions(-DROOT_PATH_SIZE=${ROOT_PATH_SIZE}) + + set(CMAKE_C_FLAGS_DEBUG "-DDEBUG=0 ${CMAKE_C_FLAGS_DEBUG}") diff --git a/poky/meta/recipes-graphics/vulkan/vulkan-samples_git.bb b/poky/meta/recipes-graphics/vulkan/vulkan-samples_git.bb index 896b24832..b7c38f654 100644 --- a/poky/meta/recipes-graphics/vulkan/vulkan-samples_git.bb +++ b/poky/meta/recipes-graphics/vulkan/vulkan-samples_git.bb @@ -1,15 +1,17 @@ DESCRIPTION = "The Vulkan Samples is collection of resources to help develop optimized Vulkan applications." +HOMEPAGE = "https://www.khronos.org/vulkan/" +BUGTRACKER = "https://github.com/KhronosGroup/Vulkan-Samples/issues" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=48aa35cefb768436223a6e7f18dc2a2a" SRC_URI = "gitsm://github.com/KhronosGroup/Vulkan-Samples.git \ file://0001-CMakeLists.txt-do-not-hardcode-lib-as-installation-t.patch \ - file://0001-support-link-against-libatomic-if-no-built-in-atomic.patch \ + file://debugfix.patch \ " UPSTREAM_CHECK_COMMITS = "1" -SRCREV = "fdc8fab1a520df5566de3eda7b526b24f04e6379" +SRCREV = "55cebd9e7cc4153a3a7b3a45d42274c0e2a17815" UPSTREAM_CHECK_GITTAGREGEX = "These are not the releases you're looking for" S = "${WORKDIR}/git" @@ -19,3 +21,14 @@ REQUIRED_DISTRO_FEATURES = 'vulkan' inherit cmake features_check FILES_${PN} += "${datadir}" + +# +# There is code to remove the prefix CMAKE_SOURCE_DIR from __FILENAME__ paths +# used for logging with LOGE in the code. We need to make this match the value we use +# in the debug source remapping from CFLAGS +# +EXTRA_OECMAKE += "-DCMAKE_DEBUG_SRCDIR=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/" +# Binaries built with PCH enabled don't appear reproducible, differing results were seen +# from some builds depending on the point the PCH was compiled. Disable it to be +# deterministic +EXTRA_OECMAKE += "-DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON" diff --git a/poky/meta/recipes-graphics/vulkan/vulkan-tools_1.2.162.0.bb b/poky/meta/recipes-graphics/vulkan/vulkan-tools_1.2.162.1.bb index 972859c93..a5c3bbcb1 100644 --- a/poky/meta/recipes-graphics/vulkan/vulkan-tools_1.2.162.0.bb +++ b/poky/meta/recipes-graphics/vulkan/vulkan-tools_1.2.162.1.bb @@ -1,4 +1,5 @@ SUMMARY = "Vulkan Utilities and Tools" +DESCRIPTION = "Assist development by enabling developers to verify their applications correct use of the Vulkan API." HOMEPAGE = "https://www.khronos.org/vulkan/" BUGTRACKER = "https://github.com/KhronosGroup/Vulkan-Tools" SECTION = "libs" @@ -6,7 +7,7 @@ SECTION = "libs" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57" SRC_URI = "git://github.com/KhronosGroup/Vulkan-Tools.git;branch=sdk-1.2.162" -SRCREV = "9e9d7c24ed8b321815f77f31c100bbf9462193b4" +SRCREV = "8f0c2e40d4134f53f82ce48de72c7be92baa6b3d" S = "${WORKDIR}/git" |