Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCHv2 0/6] Vulkan improvements
@ 2017-07-06  7:54 Jussi Kukkonen
  2017-07-06  7:54 ` [PATCHv2 1/6] vulkan: Upgrade 1.0.39.1 -> 1.0.51.0 Jussi Kukkonen
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Jussi Kukkonen @ 2017-07-06  7:54 UTC (permalink / raw)
  To: openembedded-core

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.patch

-- 
2.1.4



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCHv2 1/6] vulkan: Upgrade 1.0.39.1 -> 1.0.51.0
  2017-07-06  7:54 [PATCHv2 0/6] Vulkan improvements Jussi Kukkonen
@ 2017-07-06  7:54 ` Jussi Kukkonen
  2017-07-06  7:54 ` [PATCHv2 2/6] assimp: Add as dependency of vulkan-demos Jussi Kukkonen
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Jussi Kukkonen @ 2017-07-06  7:54 UTC (permalink / raw)
  To: openembedded-core

Remove a patch that's no longer needed

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
---
 ...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%)

diff --git a/meta/recipes-graphics/vulkan/vulkan/0001-Use-getenv-if-secure_getenv-does-not-exist.patch b/meta/recipes-graphics/vulkan/vulkan/0001-Use-getenv-if-secure_getenv-does-not-exist.patch
deleted file mode 100644
index 694922c..0000000
--- a/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/meta/recipes-graphics/vulkan/vulkan_1.0.39.1.bb b/meta/recipes-graphics/vulkan/vulkan_1.0.51.0.bb
similarity index 90%
rename from meta/recipes-graphics/vulkan/vulkan_1.0.39.1.bb
rename to meta/recipes-graphics/vulkan/vulkan_1.0.51.0.bb
index 7f0ba21..fe7dac0 100644
--- a/meta/recipes-graphics/vulkan/vulkan_1.0.39.1.bb
+++ b/meta/recipes-graphics/vulkan/vulkan_1.0.51.0.bb
@@ -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"
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCHv2 2/6] assimp: Add as dependency of vulkan-demos
  2017-07-06  7:54 [PATCHv2 0/6] Vulkan improvements Jussi Kukkonen
  2017-07-06  7:54 ` [PATCHv2 1/6] vulkan: Upgrade 1.0.39.1 -> 1.0.51.0 Jussi Kukkonen
@ 2017-07-06  7:54 ` Jussi Kukkonen
  2017-07-06 13:20   ` Khem Raj
  2017-07-06  7:54 ` [PATCHv2 3/6] vulkan-demos: Add recipe Jussi Kukkonen
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 10+ messages in thread
From: Jussi Kukkonen @ 2017-07-06  7:54 UTC (permalink / raw)
  To: openembedded-core

Asset import library used by Sascha Willems Vulkan demos.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
---
 meta/recipes-graphics/vulkan/assimp_git.bb | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 meta/recipes-graphics/vulkan/assimp_git.bb

diff --git a/meta/recipes-graphics/vulkan/assimp_git.bb b/meta/recipes-graphics/vulkan/assimp_git.bb
new file mode 100644
index 0000000..c519458
--- /dev/null
+++ b/meta/recipes-graphics/vulkan/assimp_git.bb
@@ -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



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCHv2 3/6] vulkan-demos: Add recipe
  2017-07-06  7:54 [PATCHv2 0/6] Vulkan improvements Jussi Kukkonen
  2017-07-06  7:54 ` [PATCHv2 1/6] vulkan: Upgrade 1.0.39.1 -> 1.0.51.0 Jussi Kukkonen
  2017-07-06  7:54 ` [PATCHv2 2/6] assimp: Add as dependency of vulkan-demos Jussi Kukkonen
@ 2017-07-06  7:54 ` Jussi Kukkonen
  2017-07-07 14:37   ` Burton, Ross
  2017-07-06  7:54 ` [PATCHv2 4/6] gstreamer1.0-plugins-bad: Add vulkan PACKAGECONFIG Jussi Kukkonen
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 10+ messages in thread
From: Jussi Kukkonen @ 2017-07-06  7:54 UTC (permalink / raw)
  To: openembedded-core

Sascha 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.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
---
 ...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

diff --git a/meta/recipes-graphics/vulkan/vulkan-demos/0001-Don-t-build-demos-with-questionably-licensed-data.patch b/meta/recipes-graphics/vulkan/vulkan-demos/0001-Don-t-build-demos-with-questionably-licensed-data.patch
new file mode 100644
index 0000000..d32c8f2
--- /dev/null
+++ b/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/meta/recipes-graphics/vulkan/vulkan-demos/0001-Support-installing-demos-support-out-of-tree-builds.patch b/meta/recipes-graphics/vulkan/vulkan-demos/0001-Support-installing-demos-support-out-of-tree-builds.patch
new file mode 100644
index 0000000..4addea3
--- /dev/null
+++ b/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/meta/recipes-graphics/vulkan/vulkan-demos_git.bb b/meta/recipes-graphics/vulkan/vulkan-demos_git.bb
new file mode 100644
index 0000000..13eab5f
--- /dev/null
+++ b/meta/recipes-graphics/vulkan/vulkan-demos_git.bb
@@ -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"
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCHv2 4/6] gstreamer1.0-plugins-bad: Add vulkan PACKAGECONFIG
  2017-07-06  7:54 [PATCHv2 0/6] Vulkan improvements Jussi Kukkonen
                   ` (2 preceding siblings ...)
  2017-07-06  7:54 ` [PATCHv2 3/6] vulkan-demos: Add recipe Jussi Kukkonen
@ 2017-07-06  7:54 ` Jussi Kukkonen
  2017-07-06  7:54 ` [PATCHv2 5/6] mesa, gstreamer: Add "vulkan" DISTRO_FEATURE Jussi Kukkonen
  2017-07-06  7:54 ` [PATCHv2 6/6] vulkan: RRECOMMEND mesa drivers Jussi Kukkonen
  5 siblings, 0 replies; 10+ messages in thread
From: Jussi Kukkonen @ 2017-07-06  7:54 UTC (permalink / raw)
  To: openembedded-core

This adds a Vulkan video sink (using xcb and/or wayland).

Add a few patches to fix the build.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
---
 .../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

diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
index 0ccfc89..4f6bc85 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
@@ -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 \
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-vkdisplay-Use-ifdef-for-platform-specific-defines.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-vkdisplay-Use-ifdef-for-platform-specific-defines.patch
new file mode 100644
index 0000000..caaa62d
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-vkdisplay-Use-ifdef-for-platform-specific-defines.patch
@@ -0,0 +1,37 @@
+From 1523ab462c1bf19055960ced255f4872b6cf9f5c Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+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 <jussi.kukkonen@intel.com>
+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
+
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-vulkan-Use-the-generated-version-of-vkconfig.h.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-vulkan-Use-the-generated-version-of-vkconfig.h.patch
new file mode 100644
index 0000000..0df145d
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-vulkan-Use-the-generated-version-of-vkconfig.h.patch
@@ -0,0 +1,64 @@
+From c23e1dc22deb495561cffb877edb2746b740a1fa Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Wed, 5 Jul 2017 11:07:05 +0300
+Subject: [PATCH 2/2] vulkan: Use the generated version of vkconfig.h
+
+Build fails in ext/vulkan/xcb and ext/vulkan/wayland when:
+* building from tarball
+* building out-of-tree
+* Only one WSI integration (xcb or wayland) is enabled by configure.ac
+This is because vkconfig.h from source directory gets used instead
+of the generated one.
+
+Add the correct build directory to "-I". Use angle bracket
+include in vkapi.h so that it actually looks in the include search
+path instead of defaulting to the same (source tree) directory.
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=784539]
+---
+ ext/vulkan/vkapi.h             | 2 +-
+ ext/vulkan/wayland/Makefile.am | 1 +
+ ext/vulkan/xcb/Makefile.am     | 1 +
+ 3 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/ext/vulkan/vkapi.h b/ext/vulkan/vkapi.h
+index e9c23aa92..a37c29d0f 100644
+--- a/ext/vulkan/vkapi.h
++++ b/ext/vulkan/vkapi.h
+@@ -23,7 +23,7 @@
+ 
+ #define VK_PROTOTYPES
+ 
+-#include "vkconfig.h"
++#include <vkconfig.h>
+ #include "vk_fwd.h"
+ #include "vkmacros.h"
+ 
+diff --git a/ext/vulkan/wayland/Makefile.am b/ext/vulkan/wayland/Makefile.am
+index f92d85e2c..10cfb70e6 100644
+--- a/ext/vulkan/wayland/Makefile.am
++++ b/ext/vulkan/wayland/Makefile.am
+@@ -14,6 +14,7 @@ noinst_HEADERS = \
+ 
+ libgstvulkan_wayland_la_CFLAGS = \
+ 	-I$(top_srcdir)/gst-libs \
++	-I$(top_builddir)/ext/vulkan \
+ 	-I$(top_srcdir)/ext/vulkan \
+ 	-I$(top_builddir)/gst-libs \
+ 	$(GST_PLUGINS_BASE_CFLAGS) \
+diff --git a/ext/vulkan/xcb/Makefile.am b/ext/vulkan/xcb/Makefile.am
+index 7debcff9e..b5103551b 100644
+--- a/ext/vulkan/xcb/Makefile.am
++++ b/ext/vulkan/xcb/Makefile.am
+@@ -14,6 +14,7 @@ noinst_HEADERS = \
+ 
+ libgstvulkan_xcb_la_CFLAGS = \
+ 	-I$(top_srcdir)/gst-libs \
++	-I$(top_builddir)/ext/vulkan \
+ 	-I$(top_srcdir)/ext/vulkan \
+ 	-I$(top_builddir)/gst-libs \
+ 	$(GST_PLUGINS_BASE_CFLAGS) \
+-- 
+2.13.2
+
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb
index 0bb4053..b4a2ab7 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb
@@ -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"
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCHv2 5/6] mesa, gstreamer: Add "vulkan" DISTRO_FEATURE
  2017-07-06  7:54 [PATCHv2 0/6] Vulkan improvements Jussi Kukkonen
                   ` (3 preceding siblings ...)
  2017-07-06  7:54 ` [PATCHv2 4/6] gstreamer1.0-plugins-bad: Add vulkan PACKAGECONFIG Jussi Kukkonen
@ 2017-07-06  7:54 ` Jussi Kukkonen
  2017-07-06  7:54 ` [PATCHv2 6/6] vulkan: RRECOMMEND mesa drivers Jussi Kukkonen
  5 siblings, 0 replies; 10+ messages in thread
From: Jussi Kukkonen @ 2017-07-06  7:54 UTC (permalink / raw)
  To: openembedded-core

It doesn't do much but does make enabling vulkan a little less fiddly.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
---
 meta/recipes-graphics/mesa/mesa.inc                            | 3 ++-
 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index 41747cf..27bc4fb 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -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"
 
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
index 4f6bc85..e964fef 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
@@ -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 \
 "
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCHv2 6/6] vulkan: RRECOMMEND mesa drivers
  2017-07-06  7:54 [PATCHv2 0/6] Vulkan improvements Jussi Kukkonen
                   ` (4 preceding siblings ...)
  2017-07-06  7:54 ` [PATCHv2 5/6] mesa, gstreamer: Add "vulkan" DISTRO_FEATURE Jussi Kukkonen
@ 2017-07-06  7:54 ` Jussi Kukkonen
  5 siblings, 0 replies; 10+ messages in thread
From: Jussi Kukkonen @ 2017-07-06  7:54 UTC (permalink / raw)
  To: openembedded-core

One less thing to remember when trying to build an image
with working vulkan.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
---
 meta/recipes-graphics/vulkan/vulkan_1.0.51.0.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-graphics/vulkan/vulkan_1.0.51.0.bb b/meta/recipes-graphics/vulkan/vulkan_1.0.51.0.bb
index fe7dac0..555d741 100644
--- a/meta/recipes-graphics/vulkan/vulkan_1.0.51.0.bb
+++ b/meta/recipes-graphics/vulkan/vulkan_1.0.51.0.bb
@@ -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"
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCHv2 2/6] assimp: Add as dependency of vulkan-demos
  2017-07-06  7:54 ` [PATCHv2 2/6] assimp: Add as dependency of vulkan-demos Jussi Kukkonen
@ 2017-07-06 13:20   ` Khem Raj
  0 siblings, 0 replies; 10+ messages in thread
From: Khem Raj @ 2017-07-06 13:20 UTC (permalink / raw)
  To: Jussi Kukkonen; +Cc: Patches and discussions about the oe-core layer

On Thu, Jul 6, 2017 at 12:54 AM, Jussi Kukkonen
<jussi.kukkonen@intel.com> wrote:
> 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

> Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
> ---
>  meta/recipes-graphics/vulkan/assimp_git.bb | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
>  create mode 100644 meta/recipes-graphics/vulkan/assimp_git.bb
>
> diff --git a/meta/recipes-graphics/vulkan/assimp_git.bb b/meta/recipes-graphics/vulkan/assimp_git.bb
> new file mode 100644
> index 0000000..c519458
> --- /dev/null
> +++ b/meta/recipes-graphics/vulkan/assimp_git.bb
> @@ -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
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCHv2 3/6] vulkan-demos: Add recipe
  2017-07-06  7:54 ` [PATCHv2 3/6] vulkan-demos: Add recipe Jussi Kukkonen
@ 2017-07-07 14:37   ` Burton, Ross
  2017-07-07 19:39     ` Burton, Ross
  0 siblings, 1 reply; 10+ messages in thread
From: Burton, Ross @ 2017-07-07 14:37 UTC (permalink / raw)
  To: Jussi Kukkonen; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 337 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCHv2 3/6] vulkan-demos: Add recipe
  2017-07-07 14:37   ` Burton, Ross
@ 2017-07-07 19:39     ` Burton, Ross
  0 siblings, 0 replies; 10+ messages in thread
From: Burton, Ross @ 2017-07-07 19:39 UTC (permalink / raw)
  To: Jussi Kukkonen; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 286 bytes --]

On 7 July 2017 at 15:37, Burton, Ross <ross.burton@intel.com> wrote:

> vulkan-demos doesn't seem to like musl:
>

No, it's not just musl.

http://errors.yoctoproject.org/Errors/Latest/?filter=567c4c106e39202990a822c053a0265ebc8f459b&type=commit

They're all qemux86?

Ross

[-- Attachment #2: Type: text/html, Size: 996 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-07-07 19:39 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-06  7:54 [PATCHv2 0/6] Vulkan improvements Jussi Kukkonen
2017-07-06  7:54 ` [PATCHv2 1/6] vulkan: Upgrade 1.0.39.1 -> 1.0.51.0 Jussi Kukkonen
2017-07-06  7:54 ` [PATCHv2 2/6] assimp: Add as dependency of vulkan-demos Jussi Kukkonen
2017-07-06 13:20   ` Khem Raj
2017-07-06  7:54 ` [PATCHv2 3/6] vulkan-demos: Add recipe Jussi Kukkonen
2017-07-07 14:37   ` Burton, Ross
2017-07-07 19:39     ` Burton, Ross
2017-07-06  7:54 ` [PATCHv2 4/6] gstreamer1.0-plugins-bad: Add vulkan PACKAGECONFIG Jussi Kukkonen
2017-07-06  7:54 ` [PATCHv2 5/6] mesa, gstreamer: Add "vulkan" DISTRO_FEATURE Jussi Kukkonen
2017-07-06  7:54 ` [PATCHv2 6/6] vulkan: RRECOMMEND mesa drivers Jussi Kukkonen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox