[OE-core] [PATCH v2 6/6] vkcube: Add recipe for minimal vulkan demo
Jussi Kukkonen
jussi.kukkonen at intel.com
Tue Feb 28 09:26:59 UTC 2017
It currently requires libvulkan_intel.so (mesa intel vulkan driver),
meaning that mesa needs to be built with "vulkan" PACKAGECONFIG.
Also, currently vkcube is only buildable with both X and wayland
support without other options.
Signed-off-by: Jussi Kukkonen <jussi.kukkonen at intel.com>
---
.../vkcube/0001-Install-the-vkcube-binary.patch | 38 ++++++++++++++++++++++
meta/recipes-graphics/vulkan/vkcube_git.bb | 18 ++++++++++
2 files changed, 56 insertions(+)
create mode 100644 meta/recipes-graphics/vulkan/vkcube/0001-Install-the-vkcube-binary.patch
create mode 100644 meta/recipes-graphics/vulkan/vkcube_git.bb
diff --git a/meta/recipes-graphics/vulkan/vkcube/0001-Install-the-vkcube-binary.patch b/meta/recipes-graphics/vulkan/vkcube/0001-Install-the-vkcube-binary.patch
new file mode 100644
index 0000000..012ee52
--- /dev/null
+++ b/meta/recipes-graphics/vulkan/vkcube/0001-Install-the-vkcube-binary.patch
@@ -0,0 +1,38 @@
+From 18d1d30a6c7ad73b25751152cc4dda89e9cf77dd Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen at intel.com>
+Date: Sat, 25 Feb 2017 18:27:54 +0200
+Subject: [PATCH] Install binary, never clean generated files
+
+We don't have the tools to regenerate the spv.h files, don't
+clean them.
+
+Upstream-Status: Inappropriate [configuration]
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen at intel.com>
+---
+ Makefile.am | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 78724bb..e208152 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -11,7 +11,7 @@ CFLAGS = -std=c11 \
+
+ CXXFLAGS = -std=c++11 $(common_CFLAGS)
+
+-noinst_PROGRAMS = vkcube
++bin_PROGRAMS = vkcube
+
+ BUILT_SOURCES = \
+ vkcube.vert.spv.h \
+@@ -30,7 +30,5 @@ vkcube_SOURCES = \
+ esTransform.c \
+ esUtil.h
+
+-CLEANFILES = $(BUILT_SOURCES)
+-
+ vkcube_CFLAGS = $(CFLAGS) $(MINIGBM_CPPFLAGS) $(LIBDRM_CFLAGS) $(WAYLAND_CFLAGS) $(LIBPNG_CFLAGS)
+ vkcube_LDADD = $(MINIGBM_LDFLAGS) $(MESA_LDFLAGS) $(LIBDRM_LIBS) $(WAYLAND_LIBS) $(LIBPNG_LIBS) -lgbm -lm -lvulkan -lxcb
+--
+2.11.0
+
diff --git a/meta/recipes-graphics/vulkan/vkcube_git.bb b/meta/recipes-graphics/vulkan/vkcube_git.bb
new file mode 100644
index 0000000..88ade83
--- /dev/null
+++ b/meta/recipes-graphics/vulkan/vkcube_git.bb
@@ -0,0 +1,18 @@
+SUMMARY = "A simple Vulkan demo"
+HOMEPAGE = "https://github.com/krh/vkcube"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://main.c;endline=24;md5=9eb35fa5573e696e3f59ec043ad2b5bc"
+
+PV = "0.1+git${SRCPV}"
+
+SRC_URI = "git://github.com/krh/vkcube.git \
+ file://0001-Install-the-vkcube-binary.patch"
+SRCREV = "80c0d047c257f486d054f28b0b381abef3327069"
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig distro_features_check
+REQUIRED_DISTRO_FEATURES = "x11 wayland"
+
+DEPENDS = "libpng libxcb wayland mesa libdrm vulkan"
--
2.1.4
More information about the Openembedded-core
mailing list