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 3/6] spirv-tools: version bump 2021.4 -> 1.3.204.0, separate spirv-headers
Date: Wed, 23 Feb 2022 11:17:07 +0100	[thread overview]
Message-ID: <20220223101710.3873749-3-p.zabel@pengutronix.de> (raw)
In-Reply-To: <20220223101710.3873749-1-p.zabel@pengutronix.de>

Instead of bumping to v2022.1 and applying the bugfix patches locally,
switch to the Vulkan SDK release version.

While spirv-tools (and shaderc) use spirv-headers by integrating the
sources into their build tree, vulkan-validationlayers looks for it
using cmake find_package. Split spirv-headers into a proper package
that can be installed into target-sysroot.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
 rules/spirv-headers.in   |  8 ++++++++
 rules/spirv-headers.make | 35 +++++++++++++++++++++++++++++++++++
 rules/spirv-tools.make   | 39 ++++++++++++---------------------------
 3 files changed, 55 insertions(+), 27 deletions(-)
 create mode 100644 rules/spirv-headers.in
 create mode 100644 rules/spirv-headers.make

diff --git a/rules/spirv-headers.in b/rules/spirv-headers.in
new file mode 100644
index 000000000000..742a7f682026
--- /dev/null
+++ b/rules/spirv-headers.in
@@ -0,0 +1,8 @@
+## SECTION=multimedia_libs
+
+menuconfig SPIRV_HEADERS
+	tristate
+	prompt "spirv-headers"
+	select HOST_CMAKE
+	help
+	  SPIR-V Headers
diff --git a/rules/spirv-headers.make b/rules/spirv-headers.make
new file mode 100644
index 000000000000..70416f79ac08
--- /dev/null
+++ b/rules/spirv-headers.make
@@ -0,0 +1,35 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2022 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_SPIRV_HEADERS) += spirv-headers
+
+#
+# Paths and names
+#
+SPIRV_HEADERS_VERSION	:= 1.3.204.0
+SPIRV_HEADERS_MD5	:= 09ea3d4f15f4d79bd58ff01239ab213e
+SPIRV_HEADERS		:= spirv-headers-$(SPIRV_HEADERS_VERSION)
+SPIRV_HEADERS_SUFFIX	:= tar.gz
+SPIRV_HEADERS_URL	:= https://github.com/KhronosGroup/SPIRV-Headers/archive/sdk-$(SPIRV_HEADERS_VERSION).$(SPIRV_HEADERS_SUFFIX)
+SPIRV_HEADERS_SOURCE	:= $(SRCDIR)/spirv-headers-$(SPIRV_HEADERS_VERSION).$(SPIRV_HEADERS_SUFFIX)
+SPIRV_HEADERS_DIR	:= $(BUILDDIR)/$(SPIRV_HEADERS)
+SPIRV_HEADERS_LICENSE	:= Khronos
+SPIRV_HEADERS_LICENSE_FILES := file://LICENSE;md5=c938b85bceb8fb26c1a807f28a52ae2d
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+SPIRV_HEADERS_CONF_TOOL	:= cmake
+SPIRV_HEADERS_CONF_OPT	:= \
+	$(CROSS_CMAKE_USR)
+
+# vim: syntax=make
diff --git a/rules/spirv-tools.make b/rules/spirv-tools.make
index 341c9aecd17f..770df808107c 100644
--- a/rules/spirv-tools.make
+++ b/rules/spirv-tools.make
@@ -14,26 +14,25 @@ PACKAGES-$(PTXCONF_SPIRV_TOOLS) += spirv-tools
 #
 # Paths and names
 #
-SPIRV_TOOLS_VERSION	:= 2021.4
-SPIRV_TOOLS_MD5		:= bb36f699fcaca7362b983d75fa5a547b
+SPIRV_TOOLS_VERSION	:= 1.3.204.0
+SPIRV_TOOLS_MD5		:= 0078b5a2635e6cefe8e47eda98ec86b4
 SPIRV_TOOLS		:= spirv-tools-$(SPIRV_TOOLS_VERSION)
 SPIRV_TOOLS_SUFFIX	:= tar.gz
-SPIRV_TOOLS_URL		:= https://github.com/KhronosGroup/SPIRV-Tools/archive/v$(SPIRV_TOOLS_VERSION).$(SPIRV_TOOLS_SUFFIX)
+SPIRV_TOOLS_URL		:= https://github.com/KhronosGroup/SPIRV-Tools/archive/sdk-$(SPIRV_TOOLS_VERSION).$(SPIRV_TOOLS_SUFFIX)
 SPIRV_TOOLS_SOURCE	:= $(SRCDIR)/$(SPIRV_TOOLS).$(SPIRV_TOOLS_SUFFIX)
 SPIRV_TOOLS_DIR		:= $(BUILDDIR)/$(SPIRV_TOOLS)
+SPIRV_TOOLS_BUILD_DIR	:= $(SPIRV_TOOLS_DIR)-build
 SPIRV_TOOLS_LICENSE	:= Apache-2.0
 SPIRV_TOOLS_LICENSE_FILES := file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57
 
+SPIRV_TOOLS_SPIRV_HEADERS_MD5		= $(SPIRV_HEADERS_MD5)
+SPIRV_TOOLS_SPIRV_HEADERS_URL		= $(SPIRV_HEADERS_URL)
+SPIRV_TOOLS_SPIRV_HEADERS_SOURCE	= $(SPIRV_HEADERS_SOURCE)
+SPIRV_TOOLS_SPIRV_HEADERS_DIR		= $(SPIRV_TOOLS_DIR)/external/spirv-headers
 
-SPIRV_HEADERS_VERSION	:= 2021-11-11-g814e728b30dd
-SPIRV_HEADERS_MD5	:= 42b6d6fef675c42eddbc7742f033c964
-SPIRV_HEADERS_SUFFIX	:= tar.gz
-SPIRV_HEADERS_URL	:= https://github.com/KhronosGroup/SPIRV-Headers/archive/$(SPIRV_HEADERS_VERSION).$(SPIRV_HEADERS_SUFFIX)
-SPIRV_HEADERS_SOURCE	:= $(SRCDIR)/spirv-headers-$(SPIRV_HEADERS_VERSION).$(SPIRV_HEADERS_SUFFIX)
-$(SPIRV_HEADERS_SOURCE) := SPIRV_HEADERS
-SPIRV_HEADERS_DIR	:= $(SPIRV_TOOLS_DIR)/external/spirv-headers
-
-SPIRV_TOOLS_SOURCES	:= $(SPIRV_TOOLS_SOURCE) $(SPIRV_HEADERS_SOURCE)
+SPIRV_TOOLS_SOURCES	:= \
+	$(SPIRV_TOOLS_SOURCE) \
+	$(SPIRV_TOOLS_SPIRV_HEADERS_SOURCE)
 
 # ----------------------------------------------------------------------------
 # Extract
@@ -43,7 +42,7 @@ $(STATEDIR)/spirv-tools.extract:
 	@$(call targetinfo)
 	@$(call clean, $(SPIRV_TOOLS_DIR))
 	@$(call extract, SPIRV_TOOLS)
-	@$(call extract, SPIRV_HEADERS)
+	@$(call extract, SPIRV_TOOLS_SPIRV_HEADERS)
 	@$(call patchin, SPIRV_TOOLS)
 	@$(call touch)
 
@@ -73,20 +72,6 @@ SPIRV_TOOLS_CONF_OPT	:= \
 	-DSPIRV_WARN_EVERYTHING=OFF \
 	-DSPIRV_WERROR=OFF
 
-# ----------------------------------------------------------------------------
-# Install
-# ----------------------------------------------------------------------------
-
-$(STATEDIR)/spirv-tools.install:
-	@$(call targetinfo)
-	@install -vD -m 644 $(SPIRV_TOOLS_DIR)-build/source/libSPIRV-Tools.a $(SPIRV_TOOLS_PKGDIR)/usr/lib/libSPIRV-Tools.a
-	@install -vD -m 644 $(SPIRV_TOOLS_DIR)-build/source/opt/libSPIRV-Tools-opt.a $(SPIRV_TOOLS_PKGDIR)/usr/lib/libSPIRV-Tools-opt.a
-	@install -vD -m 644 $(SPIRV_TOOLS_DIR)-build/source/libSPIRV-Tools-shared.so $(SPIRV_TOOLS_PKGDIR)/usr/lib/libSPIRV-Tools-shared.so
-	@mkdir -p $(SPIRV_TOOLS_PKGDIR)/usr/include
-	@cp -r $(SPIRV_HEADERS_DIR)/include/spirv $(SPIRV_TOOLS_PKGDIR)/usr/include
-	@cp -r $(SPIRV_TOOLS_DIR)/include/spirv-tools $(SPIRV_TOOLS_PKGDIR)/usr/include
-	$(call touch)
-
 # ----------------------------------------------------------------------------
 # Target-Install
 # ----------------------------------------------------------------------------
-- 
2.30.2


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


  parent reply	other threads:[~2022-02-23 10:18 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-23 10:17 [ptxdist] [PATCH 1/6] glslang: version bump 11.7.1 -> 1.3.204.0 Philipp Zabel
2022-02-23 10:17 ` [ptxdist] [PATCH 2/6] shaderc: version bump v2021.3 -> v2022.1 Philipp Zabel
2022-02-28 12:09   ` [ptxdist] [APPLIED] " Michael Olbrich
2022-02-23 10:17 ` Philipp Zabel [this message]
2022-02-24 15:56   ` [ptxdist] [PATCH 3/6] spirv-tools: version bump 2021.4 -> 1.3.204.0, separate spirv-headers Roland Hieber
2022-02-24 16:14     ` Philipp Zabel
2022-02-25  8:27       ` Michael Olbrich
2022-02-23 10:17 ` [ptxdist] [PATCH 4/6] vulkan-loader: version bump 1.2.198.1 -> 1.3.204.0 Philipp Zabel
2022-02-28 12:09   ` [ptxdist] [APPLIED] " Michael Olbrich
2022-02-23 10:17 ` [ptxdist] [PATCH 5/6] vulkan-tools: version bump 1.2.198.0 " Philipp Zabel
2022-02-28 12:09   ` [ptxdist] [APPLIED] " Michael Olbrich
2022-02-23 10:17 ` [ptxdist] [PATCH 6/6] vulkan-validationlayers: " Philipp Zabel
2022-02-28 12:09   ` [ptxdist] [APPLIED] " Michael Olbrich
2022-02-24 15:54 ` [ptxdist] [PATCH 1/6] glslang: version bump 11.7.1 " Roland Hieber
2022-02-24 16:07   ` Philipp Zabel
2022-02-25  8:42     ` Michael Olbrich
2022-02-25  8:24 ` 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=20220223101710.3873749-3-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