diff options
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-graphics/vulkan')
-rw-r--r-- | import-layers/yocto-poky/meta/recipes-graphics/vulkan/assimp_4.0.0.bb | 22 | ||||
-rw-r--r-- | import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan-demos/0001-Don-t-build-demos-with-questionably-licensed-data.patch | 91 | ||||
-rw-r--r-- | import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan-demos/0001-Fix-build-on-x86.patch | 41 | ||||
-rw-r--r-- | import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan-demos/0001-Support-installing-demos-support-out-of-tree-builds.patch | 85 | ||||
-rw-r--r-- | import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan-demos_git.bb | 41 | ||||
-rw-r--r-- | import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan/0001-Use-getenv-if-secure_getenv-does-not-exist.patch | 34 | ||||
-rw-r--r-- | import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan_1.0.51.0.bb (renamed from import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan_1.0.39.1.bb) | 8 |
7 files changed, 285 insertions, 37 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/vulkan/assimp_4.0.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/vulkan/assimp_4.0.0.bb new file mode 100644 index 0000000000..7a96a4f36c --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-graphics/vulkan/assimp_4.0.0.bb @@ -0,0 +1,22 @@ +DESCRIPTION = "Open Asset Import Library is a portable Open Source library to import \ + various well-known 3D model formats in a uniform manner." +HOMEPAGE = "http://www.assimp.org/" +SECTION = "devel" + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=2119edef0916b0bd511cb3c731076271" + +DEPENDS = "zlib" + +SRC_URI = "git://github.com/assimp/assimp.git" +UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>(\d+(\.\d+)+))" + +SRCREV = "52c8d06f5d6498afd66df983da348a6b112f1314" + +S = "${WORKDIR}/git" + +inherit cmake + +EXTRA_OECMAKE = "-DASSIMP_BUILD_ASSIMP_TOOLS=OFF -DASSIMP_BUILD_TESTS=OFF -DASSIMP_LIB_INSTALL_DIR=${baselib}" + +FILES_${PN}-dev += "${libdir}/cmake/" diff --git a/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan-demos/0001-Don-t-build-demos-with-questionably-licensed-data.patch b/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan-demos/0001-Don-t-build-demos-with-questionably-licensed-data.patch new file mode 100644 index 0000000000..d32c8f2803 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan-demos/0001-Don-t-build-demos-with-questionably-licensed-data.patch @@ -0,0 +1,91 @@ +From 55770fb07c42fe410cf8d09f8f5976babc89b9ef Mon Sep 17 00:00:00 2001 +From: Jussi Kukkonen <jussi.kukkonen@intel.com> +Date: Tue, 4 Jul 2017 17:13:45 +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> +--- + CMakeLists.txt | 13 ------------- + 1 file changed, 13 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4958fff..0f9d3e4 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -150,17 +150,11 @@ set(EXAMPLES + computeparticles + computeshader + debugmarker +- deferred +- deferredmultisampling +- deferredshadows + displacement + distancefieldfonts + dynamicuniformbuffer + gears + geometryshader +- hdr +- imgui +- indirectdraw + instancing + mesh + multisampling +@@ -170,20 +164,14 @@ set(EXAMPLES + parallaxmapping + particlefire + pbrbasic +- pbribl +- pbrtexture + pipelines + pushconstants + radialblur + raytracing +- scenerendering + screenshot +- shadowmapping +- shadowmappingomni + skeletalanimation + specializationconstants + sphericalenvmapping +- ssao + subpasses + terraintessellation + tessellation +@@ -196,7 +184,6 @@ set(EXAMPLES + texturesparseresidency + triangle + viewportarray +- vulkanscene + ) + + buildExamples() +-- +2.13.2 + diff --git a/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan-demos/0001-Fix-build-on-x86.patch b/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan-demos/0001-Fix-build-on-x86.patch new file mode 100644 index 0000000000..681b3422d9 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan-demos/0001-Fix-build-on-x86.patch @@ -0,0 +1,41 @@ +From b0495efb6c3ea3a530fcbaddac86da57ecce5a66 Mon Sep 17 00:00:00 2001 +From: Jussi Kukkonen <jussi.kukkonen@intel.com> +Date: Mon, 10 Jul 2017 13:11:12 +0300 +Subject: [PATCH] Fix build on x86 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +| func_common.inl:193:51: error: wrong number of template arguments +| (5, should be 6) struct compute_sign<T, P, vecType, false, Aligned> + +The fix is backported from the upstream glm project. + +Upstream-Status: Pending [https://github.com/SaschaWillems/Vulkan/issues/356] +Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> +--- + external/glm/glm/detail/func_common.inl | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/external/glm/glm/detail/func_common.inl b/external/glm/glm/detail/func_common.inl +index cafaed5..2dd94e1 100644 +--- a/external/glm/glm/detail/func_common.inl ++++ b/external/glm/glm/detail/func_common.inl +@@ -190,12 +190,12 @@ namespace detail + + # if GLM_ARCH == GLM_ARCH_X86 + template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType, bool Aligned> +- struct compute_sign<T, P, vecType, false, Aligned> ++ struct compute_sign<L, T, P, vecType, false, Aligned> + { + GLM_FUNC_QUALIFIER static vecType<L, T, P> call(vecType<L, T, P> const & x) + { + T const Shift(static_cast<T>(sizeof(T) * 8 - 1)); +- vecType<L, T, P> const y(vecType<typename make_unsigned<T>::type, P>(-x) >> typename make_unsigned<T>::type(Shift)); ++ vecType<L, T, P> const y(vecType<L, typename make_unsigned<T>::type, P>(-x) >> typename make_unsigned<T>::type(Shift)); + + return (x >> Shift) | y; + } +-- +2.1.4 + diff --git a/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan-demos/0001-Support-installing-demos-support-out-of-tree-builds.patch b/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan-demos/0001-Support-installing-demos-support-out-of-tree-builds.patch new file mode 100644 index 0000000000..4addea3bf1 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan-demos/0001-Support-installing-demos-support-out-of-tree-builds.patch @@ -0,0 +1,85 @@ +From edca667684764cfcc0460e448e834fadf623a887 Mon Sep 17 00:00:00 2001 +From: Jussi Kukkonen <jussi.kukkonen@intel.com> +Date: Mon, 3 Jul 2017 14:49:18 +0300 +Subject: [PATCH] Support installing demos, support out-of-tree builds + +This is especially useful for cross-compile situation where testing +happens on target. + +-DRESOURCE_INSTALL_DIR=<path> decides where data is installed (and +where the binaries will load the data from): if it's left empty, +then nothing will be installed and binaries will load the data from +CMAKE_SOURCE_DIR. + +Binaries are now correctly built in CMAKE_BINARY_DIR. + +Upstream-Status: Submitted [https://github.com/SaschaWillems/Vulkan/pull/352] +Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> +--- + CMakeLists.txt | 15 ++++++++++++++- + base/vulkanexamplebase.cpp | 2 +- + 2 files changed, 15 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b9886bc..4958fff 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -16,6 +16,8 @@ include_directories(base) + OPTION(USE_D2D_WSI "Build the project using Direct to Display swapchain" OFF) + OPTION(USE_WAYLAND_WSI "Build the project using Wayland swapchain" OFF) + ++set(RESOURCE_INSTALL_DIR "" CACHE PATH "Path to install resources to (leave empty for running uninstalled)") ++ + # Use FindVulkan module added with CMAKE 3.7 + if (NOT CMAKE_VERSION VERSION_LESS 3.7.0) + message(STATUS "Using module to find Vulkan") +@@ -108,6 +110,10 @@ function(buildExample EXAMPLE_NAME) + add_executable(${EXAMPLE_NAME} ${MAIN_CPP} ${SOURCE} ${SHADERS}) + target_link_libraries(${EXAMPLE_NAME} ${Vulkan_LIBRARY} ${ASSIMP_LIBRARIES} ${WAYLAND_CLIENT_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) + endif(WIN32) ++ ++ if(RESOURCE_INSTALL_DIR) ++ install(TARGETS ${EXAMPLE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR}) ++ endif() + endfunction(buildExample) + + # Build all examples +@@ -117,6 +123,13 @@ function(buildExamples) + endforeach(EXAMPLE) + endfunction(buildExamples) + ++if(RESOURCE_INSTALL_DIR) ++ add_definitions(-DVK_EXAMPLE_DATA_DIR=\"${RESOURCE_INSTALL_DIR}/\") ++ install(DIRECTORY data/ DESTINATION ${RESOURCE_INSTALL_DIR}/) ++else() ++ add_definitions(-DVK_EXAMPLE_DATA_DIR=\"${CMAKE_SOURCE_DIR}/data/\") ++endif() ++ + # Compiler specific stuff + IF(MSVC) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc") +@@ -128,7 +141,7 @@ ELSE(WIN32) + link_libraries(${XCB_LIBRARIES} ${Vulkan_LIBRARY}) + ENDIF(WIN32) + +-set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/bin/") ++set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/") + + set(EXAMPLES + bloom +diff --git a/base/vulkanexamplebase.cpp b/base/vulkanexamplebase.cpp +index 647368a..a0f28a5 100644 +--- a/base/vulkanexamplebase.cpp ++++ b/base/vulkanexamplebase.cpp +@@ -84,7 +84,7 @@ const std::string VulkanExampleBase::getAssetPath() + #if defined(__ANDROID__) + return ""; + #else +- return "./../data/"; ++ return VK_EXAMPLE_DATA_DIR; + #endif + } + #endif +-- +2.13.2 + diff --git a/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan-demos_git.bb b/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan-demos_git.bb new file mode 100644 index 0000000000..0b8943508b --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan-demos_git.bb @@ -0,0 +1,41 @@ +DESCRIPTION = "Collection of Vulkan examples" +LICENSE = "MIT" +DEPENDS = "zlib" + +LIC_FILES_CHKSUM = "file://LICENSE.md;md5=dcf473723faabf17baa9b5f2207599d0 \ + file://triangle/triangle.cpp;endline=12;md5=bccd1bf9cadd9e10086cf7872157e4fa" + +SRC_URI = "git://github.com/SaschaWillems/Vulkan.git \ + file://0001-Support-installing-demos-support-out-of-tree-builds.patch \ + file://0001-Don-t-build-demos-with-questionably-licensed-data.patch \ + file://0001-Fix-build-on-x86.patch \ +" +UPSTREAM_VERSION_UNKNOWN = "1" +SRCREV = "18df00c7b4677b0889486e16977857aa987947e2" +UPSTREAM_CHECK_GITTAGREGEX = "These are not the releases you're looking for" +S = "${WORKDIR}/git" + +REQUIRED_DISTRO_FEATURES = 'vulkan' + +inherit cmake distro_features_check +DEPENDS = "vulkan assimp" + +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/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan/0001-Use-getenv-if-secure_getenv-does-not-exist.patch b/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan/0001-Use-getenv-if-secure_getenv-does-not-exist.patch deleted file mode 100644 index 694922cd1c..0000000000 --- a/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan/0001-Use-getenv-if-secure_getenv-does-not-exist.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 20525add1df8e1fb13fef90ac068f982def8b958 Mon Sep 17 00:00:00 2001 -From: Jussi Kukkonen <jussi.kukkonen@intel.com> -Date: Wed, 8 Mar 2017 13:23:58 +0200 -Subject: [PATCH] Use getenv() if secure_getenv() does not exist - -musl does not implement secure version: default to getenv() in that -case. - -https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/issues/1538 - -Upstream-Status: Pending -Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> ---- - loader/loader.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/loader/loader.c b/loader/loader.c -index 24758f4..bff79c1 100644 ---- a/loader/loader.c -+++ b/loader/loader.c -@@ -54,6 +54,10 @@ - #endif - #endif - -+#if !defined(__secure_getenv) -+#define __secure_getenv getenv -+#endif -+ - struct loader_struct loader = {0}; - // TLS for instance for alloc/free callbacks - THREAD_LOCAL_DECL struct loader_instance *tls_instance; --- -2.1.4 - diff --git a/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan_1.0.39.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan_1.0.51.0.bb index 45d1c493e2..9de39bc095 100644 --- a/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan_1.0.39.1.bb +++ b/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan_1.0.51.0.bb @@ -10,14 +10,15 @@ SECTION = "libs" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=99c647ca3d4f6a4b9d8628f757aad156 \ file://loader/loader.c;endline=25;md5=a87cd5442291c23d1fce4eece4cfde9d" -SRC_URI = "git://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers.git;branch=sdk-1.0.39 \ +SRC_URI = "git://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers.git;branch=sdk-1.0.51 \ file://demos-Don-t-build-tri-or-cube.patch \ - file://0001-Use-getenv-if-secure_getenv-does-not-exist.patch \ " -SRCREV = "9c21ed0fb275589c3af6118aec9ef4f1d1544dc1" +SRCREV = "8d021e4d5a9f91436f4462df1dafb222908e296d" +UPSTREAM_CHECK_GITTAGREGEX = "sdk-(?P<pver>\d+(\.\d+)+)" S = "${WORKDIR}/git" +REQUIRED_DISTRO_FEATURES = "vulkan" inherit cmake python3native lib_package distro_features_check ANY_OF_DISTRO_FEATURES = "x11 wayland" @@ -32,3 +33,4 @@ PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '' ,d)} PACKAGECONFIG[x11] = "-DBUILD_WSI_XLIB_SUPPORT=ON -DBUILD_WSI_XCB_SUPPORT=ON -DDEMOS_WSI_SELECTION=XCB, -DBUILD_WSI_XLIB_SUPPORT=OFF -DBUILD_WSI_XCB_SUPPORT=OFF -DDEMOS_WSI_SELECTION=WAYLAND, libxcb libx11 libxrandr" PACKAGECONFIG[wayland] = "-DBUILD_WSI_WAYLAND_SUPPORT=ON, -DBUILD_WSI_WAYLAND_SUPPORT=OFF, wayland" +RRECOMMENDS_${PN} = "mesa-vulkan-drivers" |