mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Philipp Zabel <p.zabel@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH v2 1/7] vulkan-loader: new package
Date: Fri, 17 Jan 2020 11:00:49 +0100	[thread overview]
Message-ID: <20200117100055.9110-1-p.zabel@pengutronix.de> (raw)

Add the Vulkan loader dispatch library and Vulkan headers in known-good
combination. There is a file scripts/know_good.json in the vulkan-loader
source tree that contains the vulkan-header commit to be used for the
SDK release.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>

---
Changes since v1:
 - Disabled Xlib support
 - Renamed X11 WSI option to XCB
 - Moved XCB and Wayland WSI options into a menuconfig
 - Updated to Vulkan 1.2
---
 rules/vulkan-loader.in   | 23 ++++++++++
 rules/vulkan-loader.make | 97 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 120 insertions(+)
 create mode 100644 rules/vulkan-loader.in
 create mode 100644 rules/vulkan-loader.make

diff --git a/rules/vulkan-loader.in b/rules/vulkan-loader.in
new file mode 100644
index 000000000000..b3551ed1ea32
--- /dev/null
+++ b/rules/vulkan-loader.in
@@ -0,0 +1,23 @@
+## SECTION=multimedia_libs
+
+menuconfig VULKAN_LOADER
+	tristate
+	prompt "vulkan-loader"
+	select HOST_CMAKE
+	select HOST_QEMU
+	select LIBXCB		if VULKAN_LOADER_XCB
+	select WAYLAND		if VULKAN_LOADER_WAYLAND
+	help
+	  Vulkan ICD Loader
+
+if VULKAN_LOADER
+
+config VULKAN_LOADER_XCB
+	bool
+	prompt "XCB"
+
+config VULKAN_LOADER_WAYLAND
+	bool
+	prompt "Wayland"
+
+endif
diff --git a/rules/vulkan-loader.make b/rules/vulkan-loader.make
new file mode 100644
index 000000000000..20569d737f9e
--- /dev/null
+++ b/rules/vulkan-loader.make
@@ -0,0 +1,97 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2020 by Philipp Zabel <p.zabel@pengutronix.de>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_VULKAN_LOADER) += vulkan-loader
+
+#
+# Paths and names
+#
+VULKAN_LOADER_VERSION	:= 1.2.131
+VULKAN_LOADER_MD5	:= 421c0efd446e58b8cbc65ffade8bf502
+VULKAN_LOADER		:= vulkan-loader-$(VULKAN_LOADER_VERSION)
+VULKAN_LOADER_SUFFIX	:= tar.gz
+VULKAN_LOADER_URL	:= https://github.com/KhronosGroup/Vulkan-Loader/archive/sdk-$(VULKAN_LOADER_VERSION).0.$(VULKAN_LOADER_SUFFIX)
+VULKAN_LOADER_SOURCE	:= $(SRCDIR)/$(VULKAN_LOADER).$(VULKAN_LOADER_SUFFIX)
+VULKAN_LOADER_DIR	:= $(BUILDDIR)/$(VULKAN_LOADER)
+VULKAN_LOADER_LICENSE	:= Apache-2.0
+VULKAN_LOADER_LICENSE_FILES := file://LICENSE.txt;md5=7dbefed23242760aa3475ee42801c5ac
+
+VULKAN_HEADERS_VERSION	:= 1.2.131
+VULKAN_HEADERS_MD5	:= fd53bc693849a584ce5a6733c8390817
+VULKAN_HEADERS_SUFFIX	:= tar.gz
+VULKAN_HEADERS_URL	:= https://github.com/KhronosGroup/Vulkan-Headers/archive/v$(VULKAN_HEADERS_VERSION).$(VULKAN_HEADERS_SUFFIX)
+VULKAN_HEADERS_SOURCE	:= $(SRCDIR)/vulkan-headers-$(VULKAN_HEADERS_VERSION).$(VULKAN_HEADERS_SUFFIX)
+$(VULKAN_HEADERS_SOURCE) := VULKAN_HEADERS
+VULKAN_HEADERS_DIR	:= $(VULKAN_LOADER_DIR)/vulkan-headers
+
+VULKAN_LOADER_SOURCES	:= $(VULKAN_LOADER_SOURCE) $(VULKAN_HEADERS_SOURCE)
+
+# ----------------------------------------------------------------------------
+# Extract
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/vulkan-loader.extract:
+	@$(call targetinfo)
+	@$(call clean, $(VULKAN_LOADER_DIR))
+	@$(call extract, VULKAN_LOADER)
+	@$(call extract, VULKAN_HEADERS)
+	@$(call patchin, VULKAN_LOADER)
+	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+VULKAN_LOADER_CONF_TOOL	:= cmake
+VULKAN_LOADER_CONF_OPT	:= \
+	$(CROSS_CMAKE_USR) \
+	-DCMAKE_BUILD_TYPE=Release \
+	-DCMAKE_CROSSCOMPILING_EMULATOR=$(PTXDIST_SYSROOT_CROSS)/bin/qemu-cross \
+	-DCMAKE_INSTALL_LIBDIR=/usr/lib \
+	-DBUILD_WSI_XCB_SUPPORT=$(call ptx/onoff, PTXCONF_VULKAN_LOADER_XCB) \
+	-DBUILD_WSI_XLIB_SUPPORT=OFF \
+	-DBUILD_WSI_WAYLAND_SUPPORT=$(call ptx/onoff, PTXCONF_VULKAN_LOADER_WAYLAND) \
+	-DBUILD_LOADER=ON \
+	-DBUILD_TESTS=OFF \
+	-DVulkanHeaders_INCLUDE_DIR=$(VULKAN_HEADERS_DIR)/include \
+	-DVulkanRegistry_DIR=$(VULKAN_HEADERS_DIR)/registry
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/vulkan-loader.install:
+	@$(call targetinfo)
+	@$(call world/install, VULKAN_LOADER)
+	@cp -rp $(VULKAN_HEADERS_DIR)/include $(VULKAN_LOADER_PKGDIR)/usr
+	@cp -rp $(VULKAN_HEADERS_DIR)/registry $(VULKAN_LOADER_PKGDIR)/usr/share/vulkan
+	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/vulkan-loader.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, vulkan-loader)
+	@$(call install_fixup, vulkan-loader, PRIORITY, optional)
+	@$(call install_fixup, vulkan-loader, SECTION, base)
+	@$(call install_fixup, vulkan-loader, AUTHOR, "Philipp Zabel <p.zabel@pengutronix.de>")
+	@$(call install_fixup, vulkan-loader, DESCRIPTION, Vulkan ICD Loader)
+
+	@$(call install_lib, vulkan-loader, 0, 0, 0644, libvulkan)
+
+	@$(call install_finish, vulkan-loader)
+
+	@$(call touch)
+
+# vim: syntax=make
-- 
2.20.1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

             reply	other threads:[~2020-01-17 10:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-17 10:00 Philipp Zabel [this message]
2020-01-17 10:00 ` [ptxdist] [PATCH v2 2/7] mesalib: enable zink gallium driver Philipp Zabel
2020-01-17 10:00 ` [ptxdist] [PATCH v2 3/7] mesalib: enable vulkan drivers Philipp Zabel
2020-01-17 10:00 ` [ptxdist] [PATCH v2 4/7] gst-plugins-bad1: enable vulkan plugin Philipp Zabel
2020-01-17 10:00 ` [ptxdist] [PATCH v2 5/7] glslang: new package Philipp Zabel
2020-02-02 14:46   ` Michael Olbrich
2020-01-17 10:00 ` [ptxdist] [PATCH v2 6/7] spirv-tools: " Philipp Zabel
2020-01-17 10:00 ` [ptxdist] [PATCH v2 7/7] vulkan-validationlayers: " Philipp Zabel
2020-02-02 14:09   ` Michael Olbrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200117100055.9110-1-p.zabel@pengutronix.de \
    --to=p.zabel@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox