summaryrefslogtreecommitdiff
path: root/poky/meta/recipes-graphics/vulkan
diff options
context:
space:
mode:
Diffstat (limited to 'poky/meta/recipes-graphics/vulkan')
-rw-r--r--poky/meta/recipes-graphics/vulkan/vulkan-demos/0001-Don-t-build-demos-with-questionably-licensed-data.patch98
-rw-r--r--poky/meta/recipes-graphics/vulkan/vulkan-demos_git.bb44
-rw-r--r--poky/meta/recipes-graphics/vulkan/vulkan-headers_1.2.154.0.bb (renamed from poky/meta/recipes-graphics/vulkan/vulkan-headers_1.2.135.0.bb)3
-rw-r--r--poky/meta/recipes-graphics/vulkan/vulkan-loader_1.2.154.1.bb (renamed from poky/meta/recipes-graphics/vulkan/vulkan-loader_1.2.135.0.bb)4
-rw-r--r--poky/meta/recipes-graphics/vulkan/vulkan-samples/0001-CMakeLists.txt-do-not-hardcode-lib-as-installation-t.patch29
-rw-r--r--poky/meta/recipes-graphics/vulkan/vulkan-samples/0001-support-link-against-libatomic-if-no-built-in-atomic.patch117
-rw-r--r--poky/meta/recipes-graphics/vulkan/vulkan-samples_git.bb21
-rw-r--r--poky/meta/recipes-graphics/vulkan/vulkan-tools_1.2.154.0.bb (renamed from poky/meta/recipes-graphics/vulkan/vulkan-tools_1.2.135.0.bb)4
8 files changed, 172 insertions, 148 deletions
diff --git a/poky/meta/recipes-graphics/vulkan/vulkan-demos/0001-Don-t-build-demos-with-questionably-licensed-data.patch b/poky/meta/recipes-graphics/vulkan/vulkan-demos/0001-Don-t-build-demos-with-questionably-licensed-data.patch
deleted file mode 100644
index 153e66273..000000000
--- a/poky/meta/recipes-graphics/vulkan/vulkan-demos/0001-Don-t-build-demos-with-questionably-licensed-data.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-From 663d51cd31fd98411e25f37aaf52b591d9639bf5 Mon Sep 17 00:00:00 2001
-From: "Maxin B. John" <maxin.john@intel.com>
-Date: Mon, 30 Jul 2018 17:23:29 +0300
-Subject: [PATCH] Don't build demos with questionably licensed data
-
-Some of the models don't have open source compatible licenses:
-don't build demos using those. Also don't build demos that need
-resources that are not included.
-
-ssao:
-scenerendering:
- Sibenik model, no license found
-
-deferred:
-deferredmultisampling:
-deferredshadows:
- armor model, CC-BY-3.0
-
-vulkanscene:
-imgui:
-shadowmapping:
- vulkanscene model, no license found
-
-indirectdraw:
- plant model, no license found
-
-hdr:
-pbribl:
-pbrtexture:
- Require external Vulkan Asset Pack
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
- examples/CMakeLists.txt | 14 --------------
- 1 file changed, 14 deletions(-)
-
-diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
-index a53c834..71a12e7 100644
---- a/examples/CMakeLists.txt
-+++ b/examples/CMakeLists.txt
-@@ -55,9 +55,6 @@ set(EXAMPLES
- conditionalrender
- conservativeraster
- debugmarker
-- deferred
-- deferredmultisampling
-- deferredshadows
- descriptorsets
- displacement
- distancefieldfonts
-@@ -65,9 +62,6 @@ set(EXAMPLES
- gears
- geometryshader
- gltfscene
-- hdr
-- imgui
-- indirectdraw
- inlineuniformblocks
- inputattachments
- instancing
-@@ -83,23 +77,16 @@ set(EXAMPLES
- parallaxmapping
- particlefire
- pbrbasic
-- pbribl
-- pbrtexture
- pipelines
- pipelinestatistics
- pushconstants
- pushdescriptors
- radialblur
- renderheadless
-- scenerendering
- screenshot
-- shadowmapping
-- shadowmappingomni
-- shadowmappingcascade
- skeletalanimation
- specializationconstants
- sphericalenvmapping
-- ssao
- stencilbuffer
- subpasses
- terraintessellation
-@@ -113,7 +100,6 @@ set(EXAMPLES
- texturesparseresidency
- triangle
- viewportarray
-- vulkanscene
- )
-
- buildExamples()
---
-2.17.1
-
diff --git a/poky/meta/recipes-graphics/vulkan/vulkan-demos_git.bb b/poky/meta/recipes-graphics/vulkan/vulkan-demos_git.bb
deleted file mode 100644
index 4175a5615..000000000
--- a/poky/meta/recipes-graphics/vulkan/vulkan-demos_git.bb
+++ /dev/null
@@ -1,44 +0,0 @@
-DESCRIPTION = "Collection of Vulkan examples"
-LICENSE = "MIT"
-DEPENDS = "zlib"
-
-LIC_FILES_CHKSUM = "file://LICENSE.md;md5=dcf473723faabf17baa9b5f2207599d0 \
- file://examples/triangle/triangle.cpp;endline=12;md5=bccd1bf9cadd9e10086cf7872157e4fa"
-
-SRCREV_glm = "1ad55c5016339b83b7eec98c31007e0aee57d2bf"
-SRCREV_ktx = "726d14d02c95bb21ec9e43807751b491d295dd3c"
-
-SRC_URI = "git://github.com/SaschaWillems/Vulkan.git \
- git://github.com/g-truc/glm;destsuffix=git/external/glm;name=glm \
- git://github.com/KhronosGroup/KTX-Software;destsuffix=git/external/ktx;name=ktx;lfs=0 \
- file://0001-Don-t-build-demos-with-questionably-licensed-data.patch \
- "
-UPSTREAM_CHECK_COMMITS = "1"
-SRCREV = "4818f85916bf88c1ca8c2ed1a46e0e758651489e"
-UPSTREAM_CHECK_GITTAGREGEX = "These are not the releases you're looking for"
-S = "${WORKDIR}/git"
-
-REQUIRED_DISTRO_FEATURES = 'vulkan'
-
-inherit cmake features_check
-DEPENDS = "vulkan-loader assimp wayland-protocols wayland-native"
-
-do_install_append () {
- # Remove assets that have uncertain licenses
- rm ${D}${datadir}/vulkan-demos/models/armor/* \
- ${D}${datadir}/vulkan-demos/models/sibenik/* \
- ${D}${datadir}/vulkan-demos/models/vulkanscene* \
- ${D}${datadir}/vulkan-demos/models/plants.dae \
- ${D}${datadir}/vulkan-demos/textures/texturearray_plants*
-
- mv ${D}${bindir}/screenshot ${D}${bindir}/vulkan-screenshot
-}
-
-EXTRA_OECMAKE = "-DRESOURCE_INSTALL_DIR=${datadir}/vulkan-demos"
-
-ANY_OF_DISTRO_FEATURES = "x11 wayland"
-
-# Can only pick one of [wayland,xcb]
-PACKAGECONFIG = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', 'xcb', d)}"
-PACKAGECONFIG[wayland] = "-DUSE_WAYLAND_WSI=ON, -DUSE_WAYLAND_WSI=OFF, wayland"
-PACKAGECONFIG[xcb] = ",,libxcb"
diff --git a/poky/meta/recipes-graphics/vulkan/vulkan-headers_1.2.135.0.bb b/poky/meta/recipes-graphics/vulkan/vulkan-headers_1.2.154.0.bb
index d21c3d62b..0e4d26096 100644
--- a/poky/meta/recipes-graphics/vulkan/vulkan-headers_1.2.135.0.bb
+++ b/poky/meta/recipes-graphics/vulkan/vulkan-headers_1.2.154.0.bb
@@ -5,10 +5,9 @@ SECTION = "libs"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57"
-# was sdk-1.2.135 branch but it was removed upstream, commit is in master branch though
SRC_URI = "git://github.com/KhronosGroup/Vulkan-Headers.git;branch=master"
-SRCREV = "fb7f9c9bcd1d1544ea203a1f3d4253d0e90c5a90"
+SRCREV = "7f9879b1b1fab53f719a9ed5e6e29533b10972b2"
S = "${WORKDIR}/git"
diff --git a/poky/meta/recipes-graphics/vulkan/vulkan-loader_1.2.135.0.bb b/poky/meta/recipes-graphics/vulkan/vulkan-loader_1.2.154.1.bb
index 8bab58f0b..23bf59f8a 100644
--- a/poky/meta/recipes-graphics/vulkan/vulkan-loader_1.2.135.0.bb
+++ b/poky/meta/recipes-graphics/vulkan/vulkan-loader_1.2.154.1.bb
@@ -9,8 +9,8 @@ SECTION = "libs"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=7dbefed23242760aa3475ee42801c5ac"
-SRC_URI = "git://github.com/KhronosGroup/Vulkan-Loader.git;branch=sdk-1.2.135"
-SRCREV = "86429d9e7f3542e88fb98ffa7d8a82c10c9828ac"
+SRC_URI = "git://github.com/KhronosGroup/Vulkan-Loader.git;branch=sdk-1.2.154"
+SRCREV = "2aa801755eab3fab610d9676c4dd94054e30c854"
S = "${WORKDIR}/git"
diff --git a/poky/meta/recipes-graphics/vulkan/vulkan-samples/0001-CMakeLists.txt-do-not-hardcode-lib-as-installation-t.patch b/poky/meta/recipes-graphics/vulkan/vulkan-samples/0001-CMakeLists.txt-do-not-hardcode-lib-as-installation-t.patch
new file mode 100644
index 000000000..90fe277a4
--- /dev/null
+++ b/poky/meta/recipes-graphics/vulkan/vulkan-samples/0001-CMakeLists.txt-do-not-hardcode-lib-as-installation-t.patch
@@ -0,0 +1,29 @@
+From 5fb216d35b6846074196e80421f3162df3b9c8cd Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Sun, 1 Nov 2020 23:19:22 +0000
+Subject: [PATCH] CMakeLists.txt: do not hardcode 'lib' as installation target
+
+Upstream-Status: Inappropriate [already fixed in newer versions]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ CMakeLists.txt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e00f8c77..f9896eed 100644
+--- a/third_party/spirv-cross/CMakeLists.txt
++++ b/third_party/spirv-cross/CMakeLists.txt
+@@ -67,8 +67,8 @@ macro(spirv_cross_add_library name config_name)
+ install(TARGETS ${name}
+ EXPORT ${config_name}Config
+ RUNTIME DESTINATION bin
+- LIBRARY DESTINATION lib
+- ARCHIVE DESTINATION lib
++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ PUBLIC_HEADER DESTINATION include/spirv_cross)
+ install(FILES ${hdrs} DESTINATION include/spirv_cross)
+ install(EXPORT ${config_name}Config DESTINATION share/${config_name}/cmake)
+--
+2.17.1
+
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
new file mode 100644
index 000000000..6c0fb6086
--- /dev/null
+++ b/poky/meta/recipes-graphics/vulkan/vulkan-samples/0001-support-link-against-libatomic-if-no-built-in-atomic.patch
@@ -0,0 +1,117 @@
+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_git.bb b/poky/meta/recipes-graphics/vulkan/vulkan-samples_git.bb
new file mode 100644
index 000000000..980557a3b
--- /dev/null
+++ b/poky/meta/recipes-graphics/vulkan/vulkan-samples_git.bb
@@ -0,0 +1,21 @@
+DESCRIPTION = "The Vulkan Samples is collection of resources to help develop optimized Vulkan applications."
+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 \
+ "
+
+UPSTREAM_CHECK_COMMITS = "1"
+SRCREV = "f52361d3cd6ac8c30fc3365a464b4e220c32cfd6"
+
+UPSTREAM_CHECK_GITTAGREGEX = "These are not the releases you're looking for"
+S = "${WORKDIR}/git"
+
+REQUIRED_DISTRO_FEATURES = 'vulkan'
+
+inherit cmake features_check
+
+FILES_${PN} += "${datadir}"
diff --git a/poky/meta/recipes-graphics/vulkan/vulkan-tools_1.2.135.0.bb b/poky/meta/recipes-graphics/vulkan/vulkan-tools_1.2.154.0.bb
index 085c0e27e..0fc3494ee 100644
--- a/poky/meta/recipes-graphics/vulkan/vulkan-tools_1.2.135.0.bb
+++ b/poky/meta/recipes-graphics/vulkan/vulkan-tools_1.2.154.0.bb
@@ -5,8 +5,8 @@ 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.135"
-SRCREV = "6d8197fd6c91d352a601587ffdde28f4cd7bc399"
+SRC_URI = "git://github.com/KhronosGroup/Vulkan-Tools.git;branch=sdk-1.2.154"
+SRCREV = "10d757bb1072416ddfbe4c24b43d4cd2f808a5c7"
S = "${WORKDIR}/git"