[PATCH 0/7] Update vulkan packages and add vulkan-validationlayers

  • Done
  • quality assurance status badge
Details
2 participants
  • Kaelyn Takata
  • Ricardo Wurmus
Owner
unassigned
Submitted by
Kaelyn Takata
Severity
normal
K
K
Kaelyn Takata wrote on 19 Aug 2022 16:48
(address . guix-patches@gnu.org)(name . Kaelyn Takata)(address . kaelyn.alexi@protonmail.com)
cover.1660919376.git.kaelyn.alexi@protonmail.com
Hi,

This patch series adds vulkan-validationlayers 1.2.201 and updates the dependent vulkan packages to compatible versions from approximately the same time period. I had added/updated these packages in a local channel about 8 or 9 months ago and have been running multiple systems with them since then. My motivation at the time was to add vulkan-validationlayers for use with the Vulkan tutorial at https://vulkan-tutorial.com.

It was only recently that I was able to fix an issue with the tutorial program not finding the .so for the validation layer, by patching the layer manifest file with the full store path of the .so. A similar phase would need to be added to the mesa package definition for its device selection layer to work properly. The error from the mesa layer not being found when I run the basic tutorial program is:

!! validation layer: libVkLayer_MESA_device_select.so: cannot open shared object file: No such file or directory

The 'set-layer-path-in-manifest phase in vulkan-validationlayers resolved a similar error about libVkLayer_khronos_validation.so.

Final note: I went to update these packages to their latest versions before submitting the series, but they trigger warnings when running programs using Vulkan with Mesa 21.3.8 due it not supporting Vulkan 1.3 (I forget the exact warning).

Cheers,
Kaelyn


Kaelyn Takata (7):
gnu: spirv-headers: Update to 1.2.198.0.
gnu: spirv-tools: Update to 2021.4.
gnu: vulkan-headers: Update to 1.2.202.
gnu: vulkan-loader: Update to 1.2.202.
gnu: vulkan-tools: Update to 1.2.201.
gnu: shaderc: Update to 2021.3.
gnu: Add vulkan-validationlayers.

gnu/packages/vulkan.scm | 94 +++++++++++++++++++++++++++++------------
1 file changed, 68 insertions(+), 26 deletions(-)


base-commit: 65cabb010e3388d10f9b25ec560bfcfab5f810d4
--
2.37.2
K
K
Kaelyn Takata wrote on 19 Aug 2022 16:50
[PATCH 1/7] gnu: spirv-headers: Update to 1.2.198.0.
(address . 57297@debbugs.gnu.org)(name . Kaelyn Takata)(address . kaelyn.alexi@protonmail.com)
16ee18966031c517de30a3d126ce6dfc90ad58a2.1660919376.git.kaelyn.alexi@protonmail.com
* gnu/packages/vulkan.scm (spirv-headers): Update to 1.2.198.0.
---
gnu/packages/vulkan.scm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index f5c619a2b2..5517bca47b 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -45,16 +45,16 @@ (define-module (gnu packages vulkan)
(define-public spirv-headers
(package
(name "spirv-headers")
- (version "1.5.3")
+ (version "1.2.198.0")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/KhronosGroup/SPIRV-Headers")
- (commit version)))
+ (commit (string-append "sdk-" version))))
(sha256
(base32
- "069sivqajp7z4p44lmrz23lvf237xpkjxd4lzrg27836pwqcz9bj"))
+ "0v6ycgfxh9d2gzhxrnxgrn5gyg2cshg55767qdg46px8412j5lbi"))
(file-name (git-file-name name version))))
(build-system cmake-build-system)
(arguments
--
2.37.2
K
K
Kaelyn Takata wrote on 19 Aug 2022 16:50
[PATCH 2/7] gnu: spirv-tools: Update to 2021.4.
(address . 57297@debbugs.gnu.org)(name . Kaelyn Takata)(address . kaelyn.alexi@protonmail.com)
ce4de0b8296be20437df619419224e4e3dfe6bc9.1660919376.git.kaelyn.alexi@protonmail.com
* gnu/packages/vulkan.scm (spirv-tools): Update to 2021.4.
---
gnu/packages/vulkan.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (22 lines)
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index 5517bca47b..5cfb94cd6f 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -77,7 +77,7 @@ (define-public spirv-headers
(define-public spirv-tools
(package
(name "spirv-tools")
- (version "2020.2")
+ (version "2021.4")
(source
(origin
(method git-fetch)
@@ -85,7 +85,7 @@ (define-public spirv-tools
(url "https://github.com/KhronosGroup/SPIRV-Tools")
(commit (string-append "v" version))))
(sha256
- (base32 "00b7xgyrcb2qq63pp3cnw5q1xqx2d9rfn65lai6n6r89s1vh3vg6"))
+ (base32 "1f0kzgx8ishzxhzrcvcmpkmb3cigyya92p3bdabsgbjr6mkmcdj3"))
(file-name (git-file-name name version))))
(build-system cmake-build-system)
(arguments
--
2.37.2
K
K
Kaelyn Takata wrote on 19 Aug 2022 16:50
[PATCH 3/7] gnu: vulkan-headers: Update to 1.2.202.
(address . 57297@debbugs.gnu.org)(name . Kaelyn Takata)(address . kaelyn.alexi@protonmail.com)
eb86f43e335e91b8cfa669ac07a37222956fe001.1660919376.git.kaelyn.alexi@protonmail.com
* gnu/packages/vulkan.scm (vulkan-headers): Update to 1.2.202.
---
gnu/packages/vulkan.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (22 lines)
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index 5cfb94cd6f..61cbcf8411 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -183,7 +183,7 @@ (define-public glslang
(define-public vulkan-headers
(package
(name "vulkan-headers")
- (version "1.2.164")
+ (version "1.2.202")
(source
(origin
(method git-fetch)
@@ -193,7 +193,7 @@ (define-public vulkan-headers
(file-name (git-file-name name version))
(sha256
(base32
- "11wzxvwim4jna1yssbmprl211dhmz8vmrd498zww3bghzlj7bljv"))))
+ "0lsjpxqb7k2mf0w1qadpki6vnwxr29kjg5y1jafl3pvk0mdy1azj"))))
(build-system cmake-build-system)
(arguments
`(#:tests? #f)) ; No tests.
--
2.37.2
K
K
Kaelyn Takata wrote on 19 Aug 2022 16:51
[PATCH 4/7] gnu: vulkan-loader: Update to 1.2.202.
(address . 57297@debbugs.gnu.org)(name . Kaelyn Takata)(address . kaelyn.alexi@protonmail.com)
f342e0ebd0bb478db05965788625006c56ac3a5d.1660919376.git.kaelyn.alexi@protonmail.com
* gnu/packages/vulkan.scm (vulkan-loader): Update to 1.2.202.
---
gnu/packages/vulkan.scm | 21 ++++++---------------
1 file changed, 6 insertions(+), 15 deletions(-)

Toggle diff (51 lines)
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index 61cbcf8411..74432298f8 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -207,7 +207,7 @@ (define-public vulkan-headers
(define-public vulkan-loader
(package
(name "vulkan-loader")
- (version "1.2.162")
+ (version "1.2.202")
(source
(origin
(method git-fetch)
@@ -217,32 +217,23 @@ (define-public vulkan-loader
(file-name (git-file-name name version))
(sha256
(base32
- "15gx9ab6w1sjq9hkpbas7z2f8f47j6mlln6p3w26qmydjj8gfjjv"))))
+ "1vsaa16clncz19lihgj39rdg4dspkxjay1ii6pkf6fpl1vkw1dh2"))))
(build-system cmake-build-system)
(arguments
`(#:configure-flags
,#~(list
(string-append "-DVULKAN_HEADERS_INSTALL_DIR="
#$(this-package-input "vulkan-headers"))
- (string-append "-DCMAKE_INSTALL_INCLUDEDIR="
- #$(this-package-input "vulkan-headers")
- "/include"))
+ (string-append "-DGOOGLETEST_INSTALL_DIR="
+ (getcwd) "/source/external/googletest")
+ "-DBUILD_TESTS=ON")
#:phases (modify-phases %standard-phases
(add-after 'unpack 'unpack-googletest
(lambda* (#:key inputs #:allow-other-keys)
(let ((gtest (assoc-ref inputs "googletest:source")))
(when gtest
(copy-recursively gtest "external/googletest"))
- #t)))
- (add-after 'unpack 'disable-loader-tests
- (lambda _
- ;; Many tests require a Vulkan driver. Skip those.
- (substitute* "tests/loader_validation_tests.cpp"
- ((".*= vkCreateInstance.*" all)
- (string-append "GTEST_SKIP();\n" all))
- (("TEST_F.*InstanceExtensionEnumerated.*" all)
- (string-append all "\nGTEST_SKIP();\n")))
- #t)))))
+ #t))))))
(native-inputs
`(("googletest:source" ,(package-source googletest))
("libxrandr" ,libxrandr)
--
2.37.2
K
K
Kaelyn Takata wrote on 19 Aug 2022 16:51
[PATCH 5/7] gnu: vulkan-tools: Update to 1.2.201.
(address . 57297@debbugs.gnu.org)(name . Kaelyn Takata)(address . kaelyn.alexi@protonmail.com)
9e5c80805dbb98b6b8c2d1a0aa6ce5392937d07a.1660919376.git.kaelyn.alexi@protonmail.com
* gnu/packages/vulkan.scm (vulkan-tools): Update to 1.2.201.
---
gnu/packages/vulkan.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (22 lines)
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index 74432298f8..104f4336f3 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -260,7 +260,7 @@ (define-public vulkan-loader
(define-public vulkan-tools
(package
(name "vulkan-tools")
- (version "1.2.162")
+ (version "1.2.201")
(source
(origin
(method git-fetch)
@@ -270,7 +270,7 @@ (define-public vulkan-tools
(file-name (git-file-name name version))
(sha256
(base32
- "129wzk7xj3vn3c8b4p7fzkd0npl58118s2i1d88gsfnlix54nagq"))))
+ "1ik90d7pygaw2pq81brqmcjiczag3biqvgpqp3cpws07glf29lf9"))))
(build-system cmake-build-system)
(inputs
(list glslang libxrandr vulkan-loader wayland))
--
2.37.2
K
K
Kaelyn Takata wrote on 19 Aug 2022 16:51
[PATCH 6/7] gnu: shaderc: Update to 2021.3.
(address . 57297@debbugs.gnu.org)(name . Kaelyn Takata)(address . kaelyn.alexi@protonmail.com)
ff85f375a17f6045054b3d27e9125e43a5475914.1660919376.git.kaelyn.alexi@protonmail.com
* gnu/packages/vulkan.scm (shaderc): Update to 2021.3.
---
gnu/packages/vulkan.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (22 lines)
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index 104f4336f3..62b5b88732 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -292,7 +292,7 @@ (define-public vulkan-tools
(define-public shaderc
(package
(name "shaderc")
- (version "2020.4")
+ (version "2021.3")
(source
(origin
(method git-fetch)
@@ -302,7 +302,7 @@ (define-public shaderc
(file-name (git-file-name name version))
(sha256
(base32
- "07h78nd964h2bdm4drzws8i1gvyal8a3wlhbcm5qxqk6vknv8hrk"))))
+ "0qjwixcx74dvx68jl51x2mp2q1346hvhwxr8w3wk36nzla62k2s6"))))
(build-system cmake-build-system)
(arguments
`(;; FIXME: Skip most of the tests, because enabling system gtest breaks
--
2.37.2
K
K
Kaelyn Takata wrote on 19 Aug 2022 16:51
[PATCH 7/7] gnu: Add vulkan-validationlayers.
(address . 57297@debbugs.gnu.org)(name . Kaelyn Takata)(address . kaelyn.alexi@protonmail.com)
3e23f0f18a0e71f2d533b410acbb3aa547c9688c.1660919376.git.kaelyn.alexi@protonmail.com
* gnu/packages/vulkan.scm (vulkan-validationlayers): New variable.
---
gnu/packages/vulkan.scm | 51 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)

Toggle diff (66 lines)
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index 62b5b88732..f458cef99c 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -4,6 +4,7 @@
;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2021 Mathieu Othacehe <othacehe@gnu.org>
+;;; Copyright © 2022 Kaelyn Takata <kaelyn.alexi@protonmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -393,3 +394,53 @@ (define-public vkd3d
(synopsis "Direct3D 12 to Vulkan translation library")
(description "vkd3d is a library for translating Direct3D 12 to Vulkan.")
(license license:lgpl2.1))))
+
+(define-public vulkan-validationlayers
+ (package
+ (name "vulkan-validationlayers")
+ (version "1.2.201")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url
+ "https://github.com/KhronosGroup/Vulkan-ValidationLayers")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1jnz9cmy5d5g6jh9p4wr0qrlqlpfp07b3cizq37i5p1bcabdgmrz"))))
+ (build-system cmake-build-system)
+ (inputs (list glslang
+ libxrandr
+ mesa
+ shaderc
+ spirv-tools
+ vulkan-loader
+ wayland))
+ (native-inputs (list pkg-config python spirv-headers vulkan-headers))
+ (arguments
+ (list #:tests? #f ;no tests
+ #:configure-flags #~(list "-DUSE_ROBIN_HOOD_HASHING=OFF"
+ (string-append "-DGLSLANG_INSTALL_DIR="
+ #$glslang)
+ (string-append
+ "-DSPIRV_HEADERS_INSTALL_DIR="
+ #$spirv-headers) "-Wno-dev")
+ #:phases #~(modify-phases %standard-phases
+ (add-after 'install 'set-layer-path-in-manifest
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (manifest (string-append out
+ "/share/vulkan/explicit_layer.d"
+ "/VkLayer_khronos_validation.json")))
+ (substitute* manifest
+ (("\"libVkLayer_khronos_validation.so\"")
+ (string-append "\"" out
+ "/lib/libVkLayer_khronos_validation.so\"")))))))))
+ (home-page "https://github.com/KhronosGroup/Vulkan-ValidationLayers")
+ (synopsis "Khronos official validation layers for Vulkan")
+ (description
+ "Vulkan-ValidationLayers provides the Khronos official validation layers that
+can assist development by enabling developers to verify their applications correctly
+use the Vulkan API.")
+ (license license:asl2.0)))
--
2.37.2
R
R
Ricardo Wurmus wrote on 1 Sep 2022 09:44
[PATCH 0/7] Update vulkan packages and add vulkan-validationlayers
(address . 57297@debbugs.gnu.org)
87ilm7r0vw.fsf@elephly.net
Thank you for the patches. Overall they look good to me, but I have
some comments:

- the first patch updates spriv-headers from 1.5.3 to 1.2.198.0. This
looks like a downgrade. Is this jump in version numbers expected?

- the commit message for the vulkan-loader update should mention the
changes in the build system arguments:

* gnu/packages/vulkan.scm (vulkan-loader): Update to 1.2.202.
[arguments]: Enable tests by removing obsolete build phase
'disable-loader-tests and adjusting configure flags.

- in the patch for vulkan-validationlayers I’d use #$output instead of
binding out to (assoc-ref outputs "out").

Other than that this all looks good to me!

--
Ricardo
K
K
Kaelyn Takata wrote on 1 Sep 2022 18:26
[PATCH v2 0/7] Update vulkan packages and add vulkan-validationlayers
(address . 57297@debbugs.gnu.org)(name . Kaelyn Takata)(address . kaelyn.alexi@protonmail.com)
cover.1662049085.git.kaelyn.alexi@protonmail.com
This is a small V2 update to rebase against master and address review
feedback. The changes are:

* Update the commit message for the vulkan-loader update to include the
[arguments] change.
* Use #$output instead of binding (assoc outputs "out") in the package
definition for vulkan-validationlayers

Also worth noting is that the versioning scheme for spirv-headers has changed;
the old version scheme went up to 1.5.4 in late 2020, and starting in 2021 the
version tags are the sdk-1.x.y.z tags used with other Vulkan SDK components

Kaelyn Takata (7):
gnu: spirv-headers: Update to 1.2.198.0.
gnu: spirv-tools: Update to 2021.4.
gnu: vulkan-headers: Update to 1.2.202.
gnu: vulkan-loader: Update to 1.2.202.
gnu: vulkan-tools: Update to 1.2.201.
gnu: shaderc: Update to 2021.3.
gnu: Add vulkan-validationlayers.

gnu/packages/vulkan.scm | 93 +++++++++++++++++++++++++++++------------
1 file changed, 67 insertions(+), 26 deletions(-)


base-commit: c053dfa52dc778eb3d965f58a85c435ae7fab0dd
--
2.37.2
K
K
Kaelyn Takata wrote on 1 Sep 2022 18:26
[PATCH v2 1/7] gnu: spirv-headers: Update to 1.2.198.0.
(address . 57297@debbugs.gnu.org)(name . Kaelyn Takata)(address . kaelyn.alexi@protonmail.com)
5b07a070928bc7bc562053aa04207c02fd95d033.1662049085.git.kaelyn.alexi@protonmail.com
* gnu/packages/vulkan.scm (spirv-headers): Update to 1.2.198.0.
---
gnu/packages/vulkan.scm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index f5c619a2b2..5517bca47b 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -45,16 +45,16 @@ (define-module (gnu packages vulkan)
(define-public spirv-headers
(package
(name "spirv-headers")
- (version "1.5.3")
+ (version "1.2.198.0")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/KhronosGroup/SPIRV-Headers")
- (commit version)))
+ (commit (string-append "sdk-" version))))
(sha256
(base32
- "069sivqajp7z4p44lmrz23lvf237xpkjxd4lzrg27836pwqcz9bj"))
+ "0v6ycgfxh9d2gzhxrnxgrn5gyg2cshg55767qdg46px8412j5lbi"))
(file-name (git-file-name name version))))
(build-system cmake-build-system)
(arguments
--
2.37.2
K
K
Kaelyn Takata wrote on 1 Sep 2022 18:26
[PATCH v2 2/7] gnu: spirv-tools: Update to 2021.4.
(address . 57297@debbugs.gnu.org)(name . Kaelyn Takata)(address . kaelyn.alexi@protonmail.com)
9f00711ffaca18983b41b39f3c47f7abde30a42e.1662049085.git.kaelyn.alexi@protonmail.com
* gnu/packages/vulkan.scm (spirv-tools): Update to 2021.4.
---
gnu/packages/vulkan.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (22 lines)
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index 5517bca47b..5cfb94cd6f 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -77,7 +77,7 @@ (define-public spirv-headers
(define-public spirv-tools
(package
(name "spirv-tools")
- (version "2020.2")
+ (version "2021.4")
(source
(origin
(method git-fetch)
@@ -85,7 +85,7 @@ (define-public spirv-tools
(url "https://github.com/KhronosGroup/SPIRV-Tools")
(commit (string-append "v" version))))
(sha256
- (base32 "00b7xgyrcb2qq63pp3cnw5q1xqx2d9rfn65lai6n6r89s1vh3vg6"))
+ (base32 "1f0kzgx8ishzxhzrcvcmpkmb3cigyya92p3bdabsgbjr6mkmcdj3"))
(file-name (git-file-name name version))))
(build-system cmake-build-system)
(arguments
--
2.37.2
K
K
Kaelyn Takata wrote on 1 Sep 2022 18:27
[PATCH v2 3/7] gnu: vulkan-headers: Update to 1.2.202.
(address . 57297@debbugs.gnu.org)(name . Kaelyn Takata)(address . kaelyn.alexi@protonmail.com)
37785a78811adc6c50c6b4e55f4bf701f4d30d27.1662049085.git.kaelyn.alexi@protonmail.com
* gnu/packages/vulkan.scm (vulkan-headers): Update to 1.2.202.
---
gnu/packages/vulkan.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (22 lines)
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index 5cfb94cd6f..61cbcf8411 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -183,7 +183,7 @@ (define-public glslang
(define-public vulkan-headers
(package
(name "vulkan-headers")
- (version "1.2.164")
+ (version "1.2.202")
(source
(origin
(method git-fetch)
@@ -193,7 +193,7 @@ (define-public vulkan-headers
(file-name (git-file-name name version))
(sha256
(base32
- "11wzxvwim4jna1yssbmprl211dhmz8vmrd498zww3bghzlj7bljv"))))
+ "0lsjpxqb7k2mf0w1qadpki6vnwxr29kjg5y1jafl3pvk0mdy1azj"))))
(build-system cmake-build-system)
(arguments
`(#:tests? #f)) ; No tests.
--
2.37.2
K
K
Kaelyn Takata wrote on 1 Sep 2022 18:27
[PATCH v2 4/7] gnu: vulkan-loader: Update to 1.2.202.
(address . 57297@debbugs.gnu.org)(name . Kaelyn Takata)(address . kaelyn.alexi@protonmail.com)
5da294ee2052a5a5d1f1d2ca62c58c988d894c93.1662049085.git.kaelyn.alexi@protonmail.com
* gnu/packages/vulkan.scm (vulkan-loader): Update to 1.2.202.
[arguments]: Enable tests by removing obsolete build phase
'disable-loader-tests and adjusting configure flags.
---
gnu/packages/vulkan.scm | 21 ++++++---------------
1 file changed, 6 insertions(+), 15 deletions(-)

Toggle diff (51 lines)
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index 61cbcf8411..74432298f8 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -207,7 +207,7 @@ (define-public vulkan-headers
(define-public vulkan-loader
(package
(name "vulkan-loader")
- (version "1.2.162")
+ (version "1.2.202")
(source
(origin
(method git-fetch)
@@ -217,32 +217,23 @@ (define-public vulkan-loader
(file-name (git-file-name name version))
(sha256
(base32
- "15gx9ab6w1sjq9hkpbas7z2f8f47j6mlln6p3w26qmydjj8gfjjv"))))
+ "1vsaa16clncz19lihgj39rdg4dspkxjay1ii6pkf6fpl1vkw1dh2"))))
(build-system cmake-build-system)
(arguments
`(#:configure-flags
,#~(list
(string-append "-DVULKAN_HEADERS_INSTALL_DIR="
#$(this-package-input "vulkan-headers"))
- (string-append "-DCMAKE_INSTALL_INCLUDEDIR="
- #$(this-package-input "vulkan-headers")
- "/include"))
+ (string-append "-DGOOGLETEST_INSTALL_DIR="
+ (getcwd) "/source/external/googletest")
+ "-DBUILD_TESTS=ON")
#:phases (modify-phases %standard-phases
(add-after 'unpack 'unpack-googletest
(lambda* (#:key inputs #:allow-other-keys)
(let ((gtest (assoc-ref inputs "googletest:source")))
(when gtest
(copy-recursively gtest "external/googletest"))
- #t)))
- (add-after 'unpack 'disable-loader-tests
- (lambda _
- ;; Many tests require a Vulkan driver. Skip those.
- (substitute* "tests/loader_validation_tests.cpp"
- ((".*= vkCreateInstance.*" all)
- (string-append "GTEST_SKIP();\n" all))
- (("TEST_F.*InstanceExtensionEnumerated.*" all)
- (string-append all "\nGTEST_SKIP();\n")))
- #t)))))
+ #t))))))
(native-inputs
`(("googletest:source" ,(package-source googletest))
("libxrandr" ,libxrandr)
--
2.37.2
K
K
Kaelyn Takata wrote on 1 Sep 2022 18:27
[PATCH v2 5/7] gnu: vulkan-tools: Update to 1.2.201.
(address . 57297@debbugs.gnu.org)(name . Kaelyn Takata)(address . kaelyn.alexi@protonmail.com)
d66818cd7fe596097d92d7d02f16cc966cde2cd2.1662049085.git.kaelyn.alexi@protonmail.com
* gnu/packages/vulkan.scm (vulkan-tools): Update to 1.2.201.
---
gnu/packages/vulkan.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (22 lines)
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index 74432298f8..104f4336f3 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -260,7 +260,7 @@ (define-public vulkan-loader
(define-public vulkan-tools
(package
(name "vulkan-tools")
- (version "1.2.162")
+ (version "1.2.201")
(source
(origin
(method git-fetch)
@@ -270,7 +270,7 @@ (define-public vulkan-tools
(file-name (git-file-name name version))
(sha256
(base32
- "129wzk7xj3vn3c8b4p7fzkd0npl58118s2i1d88gsfnlix54nagq"))))
+ "1ik90d7pygaw2pq81brqmcjiczag3biqvgpqp3cpws07glf29lf9"))))
(build-system cmake-build-system)
(inputs
(list glslang libxrandr vulkan-loader wayland))
--
2.37.2
K
K
Kaelyn Takata wrote on 1 Sep 2022 18:27
[PATCH v2 6/7] gnu: shaderc: Update to 2021.3.
(address . 57297@debbugs.gnu.org)(name . Kaelyn Takata)(address . kaelyn.alexi@protonmail.com)
7371c46322a67ba2b7331d51d4537e326794fa7d.1662049085.git.kaelyn.alexi@protonmail.com
* gnu/packages/vulkan.scm (shaderc): Update to 2021.3.
---
gnu/packages/vulkan.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (22 lines)
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index 104f4336f3..62b5b88732 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -292,7 +292,7 @@ (define-public vulkan-tools
(define-public shaderc
(package
(name "shaderc")
- (version "2020.4")
+ (version "2021.3")
(source
(origin
(method git-fetch)
@@ -302,7 +302,7 @@ (define-public shaderc
(file-name (git-file-name name version))
(sha256
(base32
- "07h78nd964h2bdm4drzws8i1gvyal8a3wlhbcm5qxqk6vknv8hrk"))))
+ "0qjwixcx74dvx68jl51x2mp2q1346hvhwxr8w3wk36nzla62k2s6"))))
(build-system cmake-build-system)
(arguments
`(;; FIXME: Skip most of the tests, because enabling system gtest breaks
--
2.37.2
K
K
Kaelyn Takata wrote on 1 Sep 2022 18:27
[PATCH v2 7/7] gnu: Add vulkan-validationlayers.
(address . 57297@debbugs.gnu.org)(name . Kaelyn Takata)(address . kaelyn.alexi@protonmail.com)
158241a8a69bd663c86be49b87c19f23589fb7dc.1662049085.git.kaelyn.alexi@protonmail.com
* gnu/packages/vulkan.scm (vulkan-validationlayers): New variable.
---
gnu/packages/vulkan.scm | 50 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)

Toggle diff (65 lines)
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index 62b5b88732..8f664334d4 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -4,6 +4,7 @@
;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2021 Mathieu Othacehe <othacehe@gnu.org>
+;;; Copyright © 2022 Kaelyn Takata <kaelyn.alexi@protonmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -393,3 +394,52 @@ (define-public vkd3d
(synopsis "Direct3D 12 to Vulkan translation library")
(description "vkd3d is a library for translating Direct3D 12 to Vulkan.")
(license license:lgpl2.1))))
+
+(define-public vulkan-validationlayers
+ (package
+ (name "vulkan-validationlayers")
+ (version "1.2.201")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url
+ "https://github.com/KhronosGroup/Vulkan-ValidationLayers")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1jnz9cmy5d5g6jh9p4wr0qrlqlpfp07b3cizq37i5p1bcabdgmrz"))))
+ (build-system cmake-build-system)
+ (inputs (list glslang
+ libxrandr
+ mesa
+ shaderc
+ spirv-tools
+ vulkan-loader
+ wayland))
+ (native-inputs (list pkg-config python spirv-headers vulkan-headers))
+ (arguments
+ (list #:tests? #f ;no tests
+ #:configure-flags #~(list "-DUSE_ROBIN_HOOD_HASHING=OFF"
+ (string-append "-DGLSLANG_INSTALL_DIR="
+ #$glslang)
+ (string-append
+ "-DSPIRV_HEADERS_INSTALL_DIR="
+ #$spirv-headers) "-Wno-dev")
+ #:phases #~(modify-phases %standard-phases
+ (add-after 'install 'set-layer-path-in-manifest
+ (lambda _
+ (let ((manifest (string-append #$output
+ "/share/vulkan/explicit_layer.d"
+ "/VkLayer_khronos_validation.json")))
+ (substitute* manifest
+ (("\"libVkLayer_khronos_validation.so\"")
+ (string-append "\"" #$output
+ "/lib/libVkLayer_khronos_validation.so\"")))))))))
+ (home-page "https://github.com/KhronosGroup/Vulkan-ValidationLayers")
+ (synopsis "Khronos official validation layers for Vulkan")
+ (description
+ "Vulkan-ValidationLayers provides the Khronos official validation layers that
+can assist development by enabling developers to verify their applications correctly
+use the Vulkan API.")
+ (license license:asl2.0)))
--
2.37.2
R
R
Ricardo Wurmus wrote on 1 Sep 2022 19:17
[PATCH v2 0/7] Update vulkan packages and add vulkan-validationlayers
(address . 57297-done@debbugs.gnu.org)
871qsvqaf2.fsf@elephly.net
This looks good, thank you!

Because updating vulkan-headers leads to rebuilds of 1000+ packages I
pushed it all to a new branch update-vulkan-headers and asked
ci.guix.gnu.org to build it on x86_64:


Once it’s all been built and we see that it doesn’t break any existing
packages we can merge it into the “master” branch.

--
Ricardo
Closed
R
R
Ricardo Wurmus wrote on 16 Sep 2022 08:34
[PATCH 0/7] Update vulkan packages and add vulkan-validationlayers
87illnkemy.fsf@elephly.net
I had rebased this on top of the “staging” branch. It seems that these
changes break a lot of downstream packages, such as weston, which builds
fine on staging, but fails on update-vulkan-headers-staging.

You can see all new failures here:

Here is the failing build of weston:

(I just restarted it to see if it’s a transient problem.)

Could you please take a look?

--
Ricardo
K
K
Kaelyn wrote on 16 Sep 2022 16:26
(name . Ricardo Wurmus)(address . rekado@elephly.net)(address . 57297@debbugs.gnu.org)
EtUSiBV9rhdbK_HCbpREKimB_-SJykoUCo3ypSNsdrOsILChOjm7lTw8FFgcupop2NZ5qRo9niJLAPe4jKASrcyKfD-Osh6m1bwrqfCDoRA=@protonmail.com
------- Original Message -------
On Friday, September 16th, 2022 at 6:34 AM, Ricardo Wurmus <rekado@elephly.net> wrote:


Toggle quote (17 lines)
> I had rebased this on top of the “staging” branch. It seems that these
> changes break a lot of downstream packages, such as weston, which builds
> fine on staging, but fails on update-vulkan-headers-staging.
>
> You can see all new failures here:
> https://ci.guix.gnu.org/jobset/update-vulkan-headers
>
> Here is the failing build of weston:
> https://ci.guix.gnu.org/build/1444003/details
>
> (I just restarted it to see if it’s a transient problem.)
>
> Could you please take a look?
>
> --
> Ricardo

Thank you for rebasing the patches, and for letting me know of the failures. I'm starting to investigate now, and have already reproduced the weston failure locally. At first glance the weston failure at least might be an (unfortunate) incompatibility with the old version of weston--weston 9.0.0 was released just over two years ago, and over a year before the vulkan versions on the branch.

Cheers,
Kaelyn
K
K
Kaelyn wrote on 15 Oct 2022 18:49
(No Subject)
(name . control@debbugs.gnu.org)(address . control@debbugs.gnu.org)
qAwOmLKJvPMcYQY67xIom9LlHSDu5JHfddhOQNYxkaqf5sd8FiVNCVpHvXbiAOdAKO-SpnWkkA-8LrxRti0Jwr1uctmAJIJtwSu7ACJJwXE=@protonmail.com
unarchive 57297
K
K
Kaelyn wrote on 15 Oct 2022 18:52
Re: [PATCH 0/7] Update vulkan packages and add vulkan-validationlayers
(name . 57297@debbugs.gnu.org)(address . 57297@debbugs.gnu.org)
2o7t-mYP44dN-oEu5yYNU528NSlrooJeZ05XVNcIReGdOBr1vU4obmavgxoYLLh7-yAMqwnmx380F23JzY9emxbyr6eUKKHbQtmnyeL0Jfk=@protonmail.com
Hi,

Sorry for the long period of silence on this patch set! I have finally found a fix for the mpv build failure with the updated spirv-headers and spirv-tools (and likely any others that failed with similar undefined symbols as well). While trying to figure out why mpv wasn't building when other distros have been shipping the same version of mpv against updated spirv & vulkan packages, I started examining their package definitions to see why that may be.

The fix is to add "-DSPIRV_TOOLS_BUILD_STATIC=OFF" to the configure flags for spirv-tools. Apparently a change to spirv-tools in late 2020 caused issues when statically linking (lost the link to the ML thread), and the common packaging approach seems to be to disable the static libs with that flag[1][2].

Quick question on procedure: would it be better to send to this bug a revised version of the single patch (#2 of 7), or to rebase the set against the tip of the staging branch and send in a v3 of all 7 patches?

Cheers,
Kaelyn


?
Your comment

This issue is archived.

To comment on this conversation send an email to 57297@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 57297
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch