Vulkan improvements
v2 cover Vulkan improvements
Changes since v1:
* Fixed type in vulkan-demos Upstream-Status
* Added ANY_OF_DISTRO_FEATURES to vulkan-demos
The branch has been force updated.
Thanks,
Jussi
The following changes since commit 4b1d270602a0542eef1b497eaf15bad2b747686f:
bitbake: bitbake-user-manual: Removed and replaced broken link (2017-07-04 16:05:22 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib jku/vulkan
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=jku/vulkan
Jussi Kukkonen (6):
vulkan: Upgrade 1.0.39.1 -> 1.0.51.0
assimp: Add as dependency of vulkan-demos
vulkan-demos: Add recipe gstreamer1.0-plugins-bad: Add vulkan PACKAGECONFIG mesa, gstreamer: Add "vulkan" DISTRO_FEATURE
vulkan: RRECOMMEND mesa drivers
meta/recipes-graphics/mesa/mesa.inc | 3 +-
meta/recipes-graphics/vulkan/assimp_git.bb | 14 ++++
...ild-demos-with-questionably-licensed-data.patch | 91 ++++++++++++++++++++++
...stalling-demos-support-out-of-tree-builds.patch | 85 ++++++++++++++++++++
meta/recipes-graphics/vulkan/vulkan-demos_git.bb | 35 +++++++++
...se-getenv-if-secure_getenv-does-not-exist.patch | 34 --------
.../{vulkan_1.0.39.1.bb => vulkan_1.0.51.0.bb} | 6 +-
.../gstreamer/gstreamer1.0-plugins-bad.inc | 6 +-
...y-Use-ifdef-for-platform-specific-defines.patch | 37 +++++++++
...n-Use-the-generated-version-of-vkconfig.h.patch | 64 +++++++++++++++
.../gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb | 2 +
11 files changed, 336 insertions(+), 41 deletions(-)
create mode 100644 meta/recipes-graphics/vulkan/assimp_git.bb
create mode 100644 meta/recipes-graphics/vulkan/vulkan-demos/0001-Don-t-build-demos-with-questionably-licensed-data.patch
create mode 100644 meta/recipes-graphics/vulkan/vulkan-demos/0001-Support-installing-demos-support-out-of-tree-builds.patch
create mode 100644 meta/recipes-graphics/vulkan/vulkan-demos_git.bb
delete mode 100644 meta/recipes-graphics/vulkan/vulkan/0001-Use-getenv-if-secure_getenv-does-not-exist.patch
rename meta/recipes-graphics/vulkan/{vulkan_1.0.39.1.bb => vulkan_1.0.51.0.bb} (90%)
create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-vkdisplay-Use-ifdef-for-platform-specific-defines.patch
create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-vulkan-Use-the-generated-version-of-vkconfig.h.patchSignature · 1 line
2.1.4
PATCH v2 1/6 vulkan: Upgrade 1.0.39.1 -> 1.0.51.0
Remove a patch that's no longer needed
---
...se-getenv-if-secure_getenv-does-not-exist.patch | 34 ----------------------
.../{vulkan_1.0.39.1.bb => vulkan_1.0.51.0.bb} | 5 ++--
2 files changed, 2 insertions(+), 37 deletions(-)
delete mode 100644 meta/recipes-graphics/vulkan/vulkan/0001-Use-getenv-if-secure_getenv-does-not-exist.patch
rename meta/recipes-graphics/vulkan/{vulkan_1.0.39.1.bb => vulkan_1.0.51.0.bb} (90%)meta/recipes-graphics/vulkan/vulkan/0001-Use-getenv-if-secure_getenv-does-not-exist.patch deleted +0 -34
@@ -1,34 +0,0 @@ -From 20525add1df8e1fb13fef90ac068f982def8b958 Mon Sep 17 00:00:00 2001 -From: Jussi Kukkonen <[email protected]> -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 <[email protected]> ---- - 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 -
meta/recipes-graphics/vulkan/vulkan_1.0.51.0.bb renamed from meta/recipes-graphics/vulkan/vulkan_1.0.39.1.bb +2 -3
@@ -10,11 +10,10 @@ 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"
Signature · 1 line
2.1.4
PATCH v2 2/6 assimp: Add as dependency of vulkan-demos
In reply to Jussi KukkonenAsset import library used by Sascha Willems Vulkan demos.
--- meta/recipes-graphics/vulkan/assimp_git.bb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 meta/recipes-graphics/vulkan/assimp_git.bb
meta/recipes-graphics/vulkan/assimp_git.bb new file +14 -0
@@ -0,0 +1,14 @@ +DESCRIPTION = "Open Asset Import Library" +LICENSE = "BSD-3-Clause" +DEPENDS = "zlib" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=2119edef0916b0bd511cb3c731076271 \ + file://code/Assimp.cpp;endline=41;md5=717f847b6e8f43c64cdbafcfea109923" + +SRC_URI = "git://github.com/assimp/assimp.git" +SRCREV = "b38ba233f530fdb103d3ede3df5126121af78b10" +S = "${WORKDIR}/git" + +inherit cmake +EXTRA_OECMAKE = "-DASSIMP_BUILD_ASSIMP_TOOLS=OFF -DASSIMP_BUILD_TESTS=OFF" +FILES_${PN}-dev += "${libdir}/cmake/assimp-3.3"
Signature · 1 line
2.1.4
Re: [PATCHv2 2/6] assimp: Add as dependency of vulkan-demos
Quoted 2 lines · Jussi Kukkonen
Asset import library used by Sascha Willems Vulkan demos.
when this is merged into core please remove it from other layers too especially. meta-oe
https://layers.openembedded.org/layerindex/branch/master/recipes/?q=assimp
Quoted 34 lines
Signed-off-by Jussi Kukkonen <[email protected]>--- meta/recipes-graphics/vulkan/assimp_git.bb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 meta/recipes-graphics/vulkan/assimp_git.bbmeta/recipes-graphics/vulkan/assimp_git.bb new file +14
-1@@ -0,0 +1,14 @@ +DESCRIPTION = "Open Asset Import Library" +LICENSE = "BSD-3-Clause" +DEPENDS = "zlib" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=2119edef0916b0bd511cb3c731076271 \ + file://code/Assimp.cpp;endline=41;md5=717f847b6e8f43c64cdbafcfea109923" + +SRC_URI = "git://github.com/assimp/assimp.git" +SRCREV = "b38ba233f530fdb103d3ede3df5126121af78b10" +S = "${WORKDIR}/git" + +inherit cmake +EXTRA_OECMAKE = "-DASSIMP_BUILD_ASSIMP_TOOLS=OFF -DASSIMP_BUILD_TESTS=OFF" +FILES_${PN}-dev += "${libdir}/cmake/assimp-3.3" --2.1.4
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
PATCH v2 3/6 vulkan-demos: Add recipe
In reply to Jussi KukkonenSascha Willems collection of Vulkan demos is useful as a smoke testing tool.
Add patch to install binaries and data. Use a combination of patch and do_install_append to avoid some 3D models with unclear licensing.
--- ...ild-demos-with-questionably-licensed-data.patch | 91 ++++++++++++++++++++++ ...stalling-demos-support-out-of-tree-builds.patch | 85 ++++++++++++++++++++ meta/recipes-graphics/vulkan/vulkan-demos_git.bb | 35 +++++++++ 3 files changed, 211 insertions(+) create mode 100644 meta/recipes-graphics/vulkan/vulkan-demos/0001-Don-t-build-demos-with-questionably-licensed-data.patch create mode 100644 meta/recipes-graphics/vulkan/vulkan-demos/0001-Support-installing-demos-support-out-of-tree-builds.patch create mode 100644 meta/recipes-graphics/vulkan/vulkan-demos_git.bb
meta/recipes-graphics/vulkan/vulkan-demos/0001-Don-t-build-demos-with-questionably-licensed-data.patch new file +91 -0
@@ -0,0 +1,91 @@ +From 55770fb07c42fe410cf8d09f8f5976babc89b9ef Mon Sep 17 00:00:00 2001 +From: Jussi Kukkonen <[email protected]> +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 <[email protected]> +--- + 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 +
meta/recipes-graphics/vulkan/vulkan-demos/0001-Support-installing-demos-support-out-of-tree-builds.patch new file +85 -0
85 lines not on this page · raw message
meta/recipes-graphics/vulkan/vulkan-demos_git.bb new file +35 -0
@@ -0,0 +1,35 @@ +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 \ +" +SRCREV = "18df00c7b4677b0889486e16977857aa987947e2" + +S = "${WORKDIR}/git" + +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* +} + +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"
Signature · 1 line
2.1.4
Re: [PATCHv2 3/6] vulkan-demos: Add recipe
vulkan-demos doesn't seem to like musl:
git/external/glm/glm/detail/../detail/func_common.inl:193:51: error: wrong number of template arguments (5, should be 6)
struct compute_sign<T, P, vecType, false, Aligned>
^
http://errors.yoctoproject.org/Errors/Details/146971/
Ross
Re: [PATCHv2 3/6] vulkan-demos: Add recipe
Quoted 2 lines · Ross
vulkan-demos doesn't seem to like musl:
No, it's not just musl.
They're all qemux86?
Ross
PATCH v2 4/6 gstreamer1.0-plugins-bad: Add vulkan PACKAGECONFIG
In reply to Jussi KukkonenThis adds a Vulkan video sink (using xcb and/or wayland).
Add a few patches to fix the build.
--- .../gstreamer/gstreamer1.0-plugins-bad.inc | 4 +- ...y-Use-ifdef-for-platform-specific-defines.patch | 37 +++++++++++++ ...n-Use-the-generated-version-of-vkconfig.h.patch | 64 ++++++++++++++++++++++ .../gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb | 2 + 4 files changed, 105 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-vkdisplay-Use-ifdef-for-platform-specific-defines.patch create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-vulkan-Use-the-generated-version-of-vkconfig.h.patch
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc +2 -2
@@ -66,6 +66,7 @@ PACKAGECONFIG[srtp] = "--enable-srtp,--disable-srtp,libsrtp" PACKAGECONFIG[uvch264] = "--enable-uvch264,--disable-uvch264,libusb1 libgudev" PACKAGECONFIG[voaacenc] = "--enable-voaacenc,--disable-voaacenc,vo-aacenc" PACKAGECONFIG[voamrwbenc] = "--enable-voamrwbenc,--disable-voamrwbenc,vo-amrwbenc" +PACKAGECONFIG[vulkan] = "--enable-vulkan,--disable-vulkan,vulkan" PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,wayland-native wayland wayland-protocols" PACKAGECONFIG[webp] = "--enable-webp,--disable-webp,libwebp"
@@ -78,7 +79,7 @@ PACKAGECONFIG[webp] = "--enable-webp,--disable-webp,libwebp" # openni2 winks direct3d directsound winscreencap acm apple_media # android_media avc bs2b chromaprint daala dts fdkaac gme gsm kate ladspa libde265 # lv2 mimic mpeg2enc mplex musepack nvenc ofa openh264 opensles pvr soundtouch spandsp -# spc teletextdec tinyalsa vdpau vulkan wasapi x265 zbar +# spc teletextdec tinyalsa vdpau wasapi x265 zbar # qt5 support is disabled, because it is not present in OE core, and requires more work than # just adding a packageconfig (it requires access to moc, uic, rcc, and qmake paths).
@@ -136,7 +137,6 @@ EXTRA_OECONF += " \ --disable-timidity \ --disable-tinyalsa \ --disable-vdpau \ - --disable-vulkan \ --disable-wasapi \ --disable-wildmidi \ --disable-wininet \
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-vkdisplay-Use-ifdef-for-platform-specific-defines.patch new file +37 -0
@@ -0,0 +1,37 @@ +From 1523ab462c1bf19055960ced255f4872b6cf9f5c Mon Sep 17 00:00:00 2001 +From: Jussi Kukkonen <[email protected]> +Date: Wed, 5 Jul 2017 11:00:42 +0300 +Subject: [PATCH 1/2] vkdisplay: Use ifdef for platform specific defines + +VK_KHR_*_SURFACE_EXTENSION_NAME are only available when corresponding +WSI is enabled. + +Signed-off-by: Jussi Kukkonen <[email protected]> +Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=784539] +--- + ext/vulkan/vkdisplay.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/ext/vulkan/vkdisplay.c b/ext/vulkan/vkdisplay.c +index 550134cd8..ade5d4583 100644 +--- a/ext/vulkan/vkdisplay.c ++++ b/ext/vulkan/vkdisplay.c +@@ -448,11 +448,15 @@ gst_vulkan_display_type_to_extension_string (GstVulkanDisplayType type) + if (type == GST_VULKAN_DISPLAY_TYPE_NONE) + return NULL; + ++#if GST_VULKAN_HAVE_WINDOW_XCB + if (type & GST_VULKAN_DISPLAY_TYPE_XCB) + return VK_KHR_XCB_SURFACE_EXTENSION_NAME; ++#endif + ++#if GST_VULKAN_HAVE_WINDOW_WAYLAND + if (type & GST_VULKAN_DISPLAY_TYPE_WAYLAND) + return VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME; ++#endif + + return NULL; + } +-- +2.13.2 +
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-vulkan-Use-the-generated-version-of-vkconfig.h.patch new file +64 -0
64 lines not on this page · raw message
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb +2 -0
@@ -18,6 +18,8 @@ SRC_URI = " \ file://0001-smoothstreaming-implement-adaptivedemux-s-get_live_s.patch \ file://0001-smoothstreaming-use-the-duration-from-the-list-of-fr.patch \ file://0001-mssdemux-improved-live-playback-support.patch \ + file://0001-vkdisplay-Use-ifdef-for-platform-specific-defines.patch \ + file://0002-vulkan-Use-the-generated-version-of-vkconfig.h.patch \ " SRC_URI[md5sum] = "2757103e57a096a1a05b3ab85b8381af" SRC_URI[sha256sum] = "23ddae506b3a223b94869a0d3eea3e9a12e847f94d2d0e0b97102ce13ecd6966"
Signature · 1 line
2.1.4
PATCH v2 5/6 mesa, gstreamer: Add "vulkan" DISTRO_FEATURE
In reply to Jussi KukkonenIt doesn't do much but does make enabling vulkan a little less fiddly.
--- meta/recipes-graphics/mesa/mesa.inc | 3 ++- meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-)
meta/recipes-graphics/mesa/mesa.inc +2 -1
@@ -25,7 +25,8 @@ REQUIRED_DISTRO_FEATURES = "opengl" EXTRA_OECONF = "--enable-shared-glapi --with-llvm-prefix=${STAGING_BINDIR_NATIVE}" PACKAGECONFIG ??= "gbm egl gles dri \ - ${@bb.utils.filter('DISTRO_FEATURES', 'wayland x11', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'wayland x11 vulkan', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11 vulkan', 'dri3', '', d)} \ " PACKAGECONFIG[gbm] = "--enable-gbm,--disable-gbm"
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc +1 -1
@@ -20,7 +20,7 @@ PACKAGECONFIG ??= " \ ${GSTREAMER_ORC} \ ${PACKAGECONFIG_GL} \ ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \ - ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'directfb vulkan', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland egl', '', d)} \ bz2 curl dash dtls hls neon rsvg sbc smoothstreaming sndfile uvch264 webp \ "
Signature · 1 line
2.1.4
PATCH v2 6/6 vulkan: RRECOMMEND mesa drivers
In reply to Jussi KukkonenOne less thing to remember when trying to build an image with working vulkan.
--- meta/recipes-graphics/vulkan/vulkan_1.0.51.0.bb | 1 + 1 file changed, 1 insertion(+)
meta/recipes-graphics/vulkan/vulkan_1.0.51.0.bb +1 -0
@@ -32,3 +32,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"
Signature · 1 line
2.1.4