[PATCH mesa-updates 00/13] Update vulkan-sdk and add dirctx-shader-compiler.

  • Open
  • quality assurance status badge
Details
3 participants
  • dan
  • John Kehayias
  • Liliana Marie Prikler
Owner
unassigned
Submitted by
dan
Severity
normal
D
[mesa-updates 00/13] Update vulkan-sdk and add dirctx-shader-compiler.
(address . guix-patches@gnu.org)(address . john.kehayias@protonmail.com)
cover.1709140055.git.i@dan.games
This patch series updates several vulkan-sdk packages to the latest vulkan-sdk
release version 1.3.275.0, and adds directx-shader-compiler, the shader
compiler by Microsoft.

vulkan-utility-libraries was also added as it's now the dependency of
vulkan-validationlayers.

Noted that many of the repos explicitly uses "vulkan-sdk-1.3.275.0" as their
release tag, but I'm not sure if it's a good name for us to use for version.

dan (13):
gnu: spirv-headers: Update to vulkan-sdk-1.3.275.0.
gnu: spirv-tools: Update to vulkan-sdk-1.3.275.0.
gnu: glslang: Update to vulkan-sdk-1.3.275.0.
gnu: spirv-cross: Update to vulkan-sdk-1.3.275.0.
gnu: shaderc: Update to 2023.8.
gnu: vulkan-headers: Update to vulkan-sdk-1.3.275.0.
gnu: vulkan-loader: Update to vulkan-sdk-1.3.275.0
gnu: volk: Update to vulkan-sdk-1.3.275.0.
gnu: vulkan-tools: Update to vulkan-sdk-1.3.275.0.
gnu: magic-enum: Update to 0.9.5.
gnu: Add vulkan-utility-libraries.
gnu: vulkan-validationlayers: Update to vulkan-sdk-1.3.275.0.
gnu: Add directx-shader-compiler.

gnu/local.mk | 1 -
gnu/packages/cpp.scm | 4 +-
.../patches/glslang-install-static-libs.patch | 61 ---
gnu/packages/vulkan.scm | 478 ++++++++++--------
4 files changed, 274 insertions(+), 270 deletions(-)
delete mode 100644 gnu/packages/patches/glslang-install-static-libs.patch


base-commit: bc6840316c665e5959469e5c857819142cc4a47b
--
2.41.0
D
[mesa-updates 01/13] gnu: spirv-headers: Update to vulkan-sdk-1.3.275.0.
(address . 69461@debbugs.gnu.org)
6925020499c96ba08bb9cf59615c6ec96a4f24cd.1709140055.git.i@dan.games
* gnu/packages/vulkan.scm (spirv-headers): Update to vulkan-sdk-1.3.275.0.

Change-Id: Ibe72c71d0d269f1e3bddba1d880a4d5fce8ed4a9
---
gnu/packages/vulkan.scm | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)

Toggle diff (55 lines)
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index 285d6be7f5..2fb1884795 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -5,7 +5,7 @@
;;; Copyright © 2020, 2023 Marius Bakke <marius@gnu.org>
;;; Copyright © 2021 Mathieu Othacehe <othacehe@gnu.org>
;;; Copyright © 2022 Kaelyn Takata <kaelyn.alexi@protonmail.com>
-;;; Copyright © 2022 dan <i@dan.games>
+;;; Copyright © 2022, 2024 dan <i@dan.games>
;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
;;;
;;; This file is part of GNU Guix.
@@ -47,7 +47,7 @@ (define-module (gnu packages vulkan)
#:use-module (gnu packages xorg))
;; Note: Remember to change vulkan-loader version when bumping this.
-(define %vulkan-sdk-version "sdk-1.3.231.1")
+(define %vulkan-sdk-version "vulkan-sdk-1.3.275.0")
(define-public spirv-headers
(package
@@ -60,12 +60,11 @@ (define-public spirv-headers
(url "https://github.com/KhronosGroup/SPIRV-Headers")
(commit version)))
(sha256
- (base32
- "0z8b485hryya2g0jxv7amwg3fjj7pchbgnsa5ldf5fwgh5js0icm"))
+ (base32 "18gr715ap9w1rjvzd6l9pl9lwfqiikm2la5apv2lplj4a0k5v3zw"))
(file-name (git-file-name name version))))
(build-system cmake-build-system)
(arguments
- `(#:tests? #f)) ;no tests
+ `(#:tests? #f)) ;no tests
(home-page "https://github.com/KhronosGroup/SPIRV-Headers")
(synopsis "Machine-readable files from the SPIR-V Registry")
(description
@@ -76,10 +75,11 @@ (define-public spirv-headers
@item JSON files describing the grammar for the SPIR-V core instruction set,
and for the GLSL.std.450 extended instruction set.
@item The XML registry file.
-@end itemize\n")
- (license (license:x11-style
- (string-append "https://github.com/KhronosGroup/SPIRV-Headers/blob/"
- version "/LICENSE")))))
+@end itemize
+")
+ (license (license:x11-style (string-append
+ "https://github.com/KhronosGroup/SPIRV-Headers/blob/"
+ version "/LICENSE")))))
(define-public spirv-tools
(package
--
2.41.0
D
[mesa-updates 03/13] gnu: glslang: Update to vulkan-sdk-1.3.275.0.
(address . 69461@debbugs.gnu.org)
61fa2d39ac8f0fce6be8946887cd19d136b3d7fc.1709140055.git.i@dan.games
* gnu/packages/vulkan.scm (glslang): Update to vulkan-sdk-1.3.275.0.
[source]: Remove patch.
[arguments]: Run tests.
[inputs]: Add spirv-tools.
* gnu/packages/patches/glslang-install-static-libs.patch: Remove file.
* gnu/local.mk (dist_patch_DATA): Ungerister it.

Change-Id: I053bb7fd2d510395a248b0f5c0107a7b264a38c7
---
gnu/local.mk | 1 -
.../patches/glslang-install-static-libs.patch | 61 -------------------
gnu/packages/vulkan.scm | 17 +++---
3 files changed, 10 insertions(+), 69 deletions(-)
delete mode 100644 gnu/packages/patches/glslang-install-static-libs.patch

Toggle diff (113 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 208d74ef3e..6177b178b3 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1352,7 +1352,6 @@ dist_patch_DATA = \
%D%/packages/patches/glibc-2.29-git-updates.patch \
%D%/packages/patches/glibc-2.29-supported-locales.patch \
%D%/packages/patches/glibc-supported-locales.patch \
- %D%/packages/patches/glslang-install-static-libs.patch \
%D%/packages/patches/gmp-arm-asm-nothumb.patch \
%D%/packages/patches/gmp-faulty-test.patch \
%D%/packages/patches/gnash-fix-giflib-version.patch \
diff --git a/gnu/packages/patches/glslang-install-static-libs.patch b/gnu/packages/patches/glslang-install-static-libs.patch
deleted file mode 100644
index a155dde30e..0000000000
--- a/gnu/packages/patches/glslang-install-static-libs.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-Install OGLCompiler et.al. even when building shared libraries. Also fix
-CMake file locations.
-
-Patch taken from Gentoo:
-
- https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-util/glslang/files/glslang-1.3.231-Install-static-libs.patch
-
-diff --git a/OGLCompilersDLL/CMakeLists.txt b/OGLCompilersDLL/CMakeLists.txt
---- a/OGLCompilersDLL/CMakeLists.txt
-+++ b/OGLCompilersDLL/CMakeLists.txt
-@@ -41,7 +41,7 @@ if(WIN32)
- source_group("Source" FILES ${SOURCES})
- endif(WIN32)
-
--if(ENABLE_GLSLANG_INSTALL AND NOT BUILD_SHARED_LIBS)
-+if(ENABLE_GLSLANG_INSTALL)
- install(TARGETS OGLCompiler EXPORT glslang-targets)
-
- # Backward compatibility
-@@ -49,7 +49,7 @@ if(ENABLE_GLSLANG_INSTALL AND NOT BUILD_SHARED_LIBS)
- message(WARNING \"Using `OGLCompilerTargets.cmake` is deprecated: use `find_package(glslang)` to find glslang CMake targets.\")
-
- if (NOT TARGET glslang::OGLCompiler)
-- include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/glslang-targets.cmake\")
-+ include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\")
- endif()
-
- add_library(OGLCompiler ALIAS glslang::OGLCompiler)
-diff --git a/glslang/CMakeLists.txt b/glslang/CMakeLists.txt
---- a/glslang/CMakeLists.txt
-+++ b/glslang/CMakeLists.txt
-@@ -203,7 +203,7 @@ endif()
- ################################################################################
- if(ENABLE_GLSLANG_INSTALL)
- install(TARGETS glslang EXPORT glslang-targets)
-- if(NOT BUILD_SHARED_LIBS)
-+ if(BUILD_SHARED_LIBS)
- install(TARGETS MachineIndependent EXPORT glslang-targets)
- install(TARGETS GenericCodeGen EXPORT glslang-targets)
-
-diff --git a/glslang/OSDependent/Unix/CMakeLists.txt b/glslang/OSDependent/Unix/CMakeLists.txt
---- a/glslang/OSDependent/Unix/CMakeLists.txt
-+++ b/glslang/OSDependent/Unix/CMakeLists.txt
-@@ -52,7 +52,7 @@ else()
- target_link_libraries(OSDependent Threads::Threads)
- endif()
-
--if(ENABLE_GLSLANG_INSTALL AND NOT BUILD_SHARED_LIBS)
-+if(ENABLE_GLSLANG_INSTALL)
- install(TARGETS OSDependent EXPORT glslang-targets)
-
- # Backward compatibility
-@@ -60,7 +60,7 @@ if(ENABLE_GLSLANG_INSTALL AND NOT BUILD_SHARED_LIBS)
- message(WARNING \"Using `OSDependentTargets.cmake` is deprecated: use `find_package(glslang)` to find glslang CMake targets.\")
-
- if (NOT TARGET glslang::OSDependent)
-- include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/glslang-targets.cmake\")
-+ include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\")
- endif()
-
- add_library(OSDependent ALIAS glslang::OSDependent)
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index d29810f4c6..3b485901d8 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -196,17 +196,20 @@ (define-public glslang
(uri (git-reference
(url "https://github.com/KhronosGroup/glslang")
(commit version)))
- (patches (search-patches "glslang-install-static-libs.patch"))
(sha256
- (base32
- "12a1zl8qxa28nbf6m67260c0lwdw3bqbj0jz1382wgm5px1fpqw6"))
+ (base32 "15xf1p9wwyvcps2kbyfiqnch3x2a1a9bd9aixq2y4yv9ir9hhhpf"))
(file-name (git-file-name name version))))
(build-system cmake-build-system)
(arguments
- '(#:tests? #f ;FIXME: requires bundled SPIRV-Tools
- #:configure-flags '("-DBUILD_SHARED_LIBS=ON")))
- (native-inputs
- (list pkg-config python))
+ '(#:configure-flags '("-DBUILD_SHARED_LIBS=ON"
+ "-DALLOW_EXTERNAL_SPIRV_TOOLS=ON")
+ #:phases (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "ctest")))))))
+ (inputs (list spirv-tools))
+ (native-inputs (list pkg-config python))
(home-page "https://github.com/KhronosGroup/glslang")
(synopsis "OpenGL and OpenGL ES shader front end and validator")
(description
--
2.41.0
D
[mesa-updates 05/13] gnu: shaderc: Update to 2023.8.
(address . 69461@debbugs.gnu.org)
3e30ab660277e638f54846fab8c10ef298107114.1709140055.git.i@dan.games
* gnu/packages/vulkan.scm (shaderc): Update to 2023.8.
[arguments]<#:configure-flags>: Specify python executable.
<#:phases>: Remove drop-additional-glslang-deps phase.
[inputs]: Remove python.
[native-inputs]: Add python.

Change-Id: I1babcabf0be17c6a6237d30fad9b8dcd7a2d2ccf
---
gnu/packages/vulkan.scm | 77 +++++++++++++++++++----------------------
1 file changed, 35 insertions(+), 42 deletions(-)

Toggle diff (103 lines)
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index 12baf52f92..38f723bd91 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -355,7 +355,7 @@ (define-public shaderc
(package
(name "shaderc")
;; shaderc doesn't follow the versioning scheme of vulkan sdk
- (version "2022.3")
+ (version "2023.8")
(source
(origin
(method git-fetch)
@@ -364,53 +364,46 @@ (define-public shaderc
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32
- "0sdbfi66zmqj0c5q5yv2zvcvry7557yzgxk2mwflyjgqh7kdhb8d"))))
+ (base32 "0cs36p1y2269gjfv75fvs43ymsapmc8gsy2n91jnaqs3mpgqkjbk"))))
(build-system cmake-build-system)
(arguments
`(;; FIXME: Skip most of the tests, because enabling system gtest breaks
;; the build: <https://github.com/google/shaderc/issues/470>.
- #:configure-flags
- (list "-DSHADERC_SKIP_TESTS=ON"
- ;; Note: despite the name, this just specifies the headers.
- (string-append "-Dglslang_SOURCE_DIR="
- (assoc-ref %build-inputs "glslang") "/include/glslang"))
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'do-not-look-for-bundled-sources
- (lambda _
- (substitute* "CMakeLists.txt"
- (("add_subdirectory\\(third_party\\)")
- ""))
+ #:configure-flags (list "-DSHADERC_SKIP_TESTS=ON"
+ ;; These two flags are copied from:
+ ;; https://sdk.lunarg.com/sdk/download/1.3.275.0/linux/config.json
+ "-DSHADERC_ENABLE_SHARED_CRT=ON"
+ "-DSHADERC_SKIP_COPYRIGHT_CHECK=ON"
+ "-DPYTHON_EXECUTABLE=python3"
+ ;; Note: despite the name, this just specifies the headers.
+ (string-append "-Dglslang_SOURCE_DIR="
+ (assoc-ref %build-inputs
+ "glslang")
+ "/include/glslang"))
+ #:phases (modify-phases %standard-phases
+ (add-after 'unpack 'do-not-look-for-bundled-sources
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("add_subdirectory\\(third_party\\)")
+ ""))
- (substitute* "glslc/test/CMakeLists.txt"
- (("\\$<TARGET_FILE:spirv-dis>")
- (which "spirv-dis")))
+ (substitute* "glslc/test/CMakeLists.txt"
+ (("\\$<TARGET_FILE:spirv-dis>")
+ (which "spirv-dis")))
- ;; Do not attempt to use git to encode version information.
- (substitute* "glslc/CMakeLists.txt"
- (("add_dependencies\\(glslc_exe build-version\\)")
- ""))
- (call-with-output-file "glslc/src/build-version.inc"
- (lambda (port)
- (format port "\"~a\"\n\"~a\"\n\"~a\"~%"
- ,version
- ,(package-version spirv-tools)
- ,(package-version glslang))))
- #t))
- ;; see: https://github.com/google/shaderc/pull/1276
- (add-after 'do-not-look-for-bundled-sources 'drop-additional-glslang-deps
- (lambda _
- (substitute* "glslc/CMakeLists.txt"
- (("OSDependent OGLCompiler") ""))
- (substitute* "libshaderc/CMakeLists.txt"
- (("OSDependent OGLCompiler") ""))
- (substitute* "libshaderc_util/CMakeLists.txt"
- (("OSDependent OGLCompiler") "")))))))
- (inputs
- (list glslang python spirv-headers spirv-tools))
- (native-inputs
- (list pkg-config))
+ ;; Do not attempt to use git to encode version information.
+ (substitute* "glslc/CMakeLists.txt"
+ (("add_dependencies\\(glslc_exe build-version\\)")
+ ""))
+ (call-with-output-file "glslc/src/build-version.inc"
+ (lambda (port)
+ (format port "\"~a\"\n\"~a\"\n\"~a\"~%"
+ ,version
+ ,(package-version spirv-tools)
+ ,(package-version glslang))))
+ #t)))))
+ (inputs (list glslang spirv-headers spirv-tools))
+ (native-inputs (list pkg-config python))
(home-page "https://github.com/google/shaderc")
(synopsis "Tools for shader compilation")
(description "Shaderc is a collection of tools, libraries, and tests for
--
2.41.0
D
[mesa-updates 06/13] gnu: vulkan-headers: Update to vulkan-sdk-1.3.275.0.
(address . 69461@debbugs.gnu.org)
62d151e6c27c8f56ebaf6b034183a59483d3ab4c.1709140055.git.i@dan.games
* gnu/packages/vulkan.scm (vulkan-headers): Update to vulkan-sdk-1.3.275.0.

Change-Id: I453837144979fbf63b8b45704cec90aafc002b58
---
gnu/packages/vulkan.scm | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)

Toggle diff (23 lines)
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index 38f723bd91..ea02d9887b 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -232,13 +232,11 @@ (define-public vulkan-headers
(commit version)))
(file-name (git-file-name name version))
(sha256
- (base32
- "167zdank6pn66mzjdwgrdlmhmsy4v2k0nhw0nwg649k863rgi00j"))))
+ (base32 "1ihzbn6aw20i40mlqv2ys3xw1g9ld79890a0bm7wpqmbp67s84wh"))))
(build-system cmake-build-system)
(arguments
- `(#:tests? #f)) ; No tests.
- (home-page
- "https://github.com/KhronosGroup/Vulkan-Headers")
+ `(#:tests? #f)) ;No tests.
+ (home-page "https://github.com/KhronosGroup/Vulkan-Headers")
(synopsis "Vulkan Header files and API registry")
(description
"Vulkan-Headers contains header files and API registry for Vulkan.")
--
2.41.0
D
[mesa-updates 07/13] gnu: vulkan-loader: Update to vulkan-sdk-1.3.275.0
(address . 69461@debbugs.gnu.org)
8f806fbbb811debf1f63899fc8a882b4ac8ec723.1709140055.git.i@dan.games
* gnu/packages/vulkan.scm (vulkan-loader): Update to vulkan-sdk-1.3.275.0.
[arguments]<#:phases>: Change the place setting system googletest.
[native-search-paths]: export XDG_DATA_DIRS.

Change-Id: Ibd74e303a2be4f972917c2e88367eca7db6fbc5b
---
gnu/packages/vulkan.scm | 86 ++++++++++++++++++-----------------------
1 file changed, 37 insertions(+), 49 deletions(-)

Toggle diff (127 lines)
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index ea02d9887b..8e162402fa 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -46,7 +46,6 @@ (define-module (gnu packages vulkan)
#:use-module (gnu packages wine)
#:use-module (gnu packages xorg))
-;; Note: Remember to change vulkan-loader version when bumping this.
(define %vulkan-sdk-version "vulkan-sdk-1.3.275.0")
(define-public spirv-headers
@@ -245,19 +244,16 @@ (define-public vulkan-headers
(define-public vulkan-loader
(package
(name "vulkan-loader")
- ;; XXX: Take a slightly newer commit to fix a test failure on i686:
- ;; https://github.com/KhronosGroup/Vulkan-Loader/pull/1036
- (version "sdk-1.3.232")
+ (version %vulkan-sdk-version)
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/KhronosGroup/Vulkan-Loader")
- (commit "v1.3.232")))
+ (commit version)))
(file-name (git-file-name name version))
(sha256
- (base32
- "0w69sh669sx9pwlvv2rv92ds2hm2rbzsa6qqcmd8kcad0qfq7dz2"))))
+ (base32 "0kcq6xsm151mk08vvqjlhj5mfxv4zgq35a2yi4f7yax20mfd8wz7"))))
(build-system cmake-build-system)
(arguments
(list
@@ -265,45 +261,38 @@ (define-public vulkan-loader
;; Limit the tests to those architectures tested upstream.
#:tests? (and (%current-system)
(target-x86?))
- #:configure-flags
- #~(list (string-append "-DVULKAN_HEADERS_INSTALL_DIR="
- (dirname (dirname
- (search-input-directory
- %build-inputs "include/vulkan"))))
- #$@(if (%current-target-system)
- #~("-DBUILD_TESTS=OFF" "-DUSE_GAS=OFF")
- #~("-DBUILD_TESTS=ON")))
- #:phases
- #~(modify-phases %standard-phases
- (add-after 'unpack 'fix-pkg-config-file
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((vulkan-headers (dirname (search-input-directory
- inputs "include/vulkan"))))
- ;; Ensure the pkg-config file refers to vulkan-headers.
- (substitute* "loader/vulkan.pc.in"
- (("^includedir=.*")
- (string-append "includedir=" vulkan-headers "\n"))))))
- (add-after 'unpack 'use-system-googletest
- (lambda _
- ;; Inform the build system that googletest is already built.
- (substitute* "CMakeLists.txt"
- ((".*if\\(TARGET gtest\\)")
- (string-append " find_package(GTest REQUIRED)\n"
- " if(true)")))
- ;; Use the namespaced variable.
- (substitute* "tests/framework/CMakeLists.txt"
- (("PUBLIC gtest ")
- "PUBLIC GTest::gtest ")))))))
- (native-inputs
- (list googletest
- libxrandr
- pkg-config
- python
- wayland))
- (inputs
- (list vulkan-headers libxrandr))
- (home-page
- "https://github.com/KhronosGroup/Vulkan-Loader")
+ #:configure-flags #~(list (string-append "-DVULKAN_HEADERS_INSTALL_DIR="
+ (dirname (dirname (search-input-directory
+ %build-inputs
+ "include/vulkan"))))
+ #$@(if (%current-target-system)
+ #~("-DBUILD_TESTS=OFF" "-DUSE_GAS=OFF")
+ #~("-DBUILD_TESTS=ON")))
+ #:phases #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-pkg-config-file
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((vulkan-headers (dirname (search-input-directory
+ inputs "include/vulkan"))))
+ ;; Ensure the pkg-config file refers to vulkan-headers.
+ (substitute* "loader/vulkan.pc.in"
+ (("^includedir=.*")
+ (string-append "includedir=" vulkan-headers "\n"))))))
+ (add-after 'unpack 'use-system-googletest
+ (lambda _
+ (substitute* "tests/CMakeLists.txt"
+ (("message\\(FATAL_ERROR \"Could not find googletest directory. See BUILD.md\"\\)")
+ "find_package(GTest REQUIRED)"))
+ ;; Use the namespaced variable.
+ (substitute* "tests/framework/CMakeLists.txt"
+ (("PUBLIC gtest ")
+ "PUBLIC GTest::gtest ")))))))
+ (native-inputs (list googletest libxrandr pkg-config python wayland))
+ (inputs (list vulkan-headers libxrandr))
+ (native-search-paths
+ (list (search-path-specification
+ (variable "XDG_DATA_DIRS")
+ (files '("share")))))
+ (home-page "https://github.com/KhronosGroup/Vulkan-Loader")
(synopsis "Khronos official ICD loader and validation layers for Vulkan")
(description
"Vulkan allows multiple @dfn{Installable Client Drivers} (ICDs) each
@@ -313,9 +302,8 @@ (define-public vulkan-loader
and the ICD.")
;; This software is mainly Apache 2.0 licensed, but contains some components
;; covered by other licenses. See COPYRIGHT.txt for details.
- (license (list license:asl2.0 ;LICENSE.txt
- (license:x11-style "file://COPYRIGHT.txt")
- license:bsd-3))))
+ (license (list license:asl2.0 ;LICENSE.txt
+ (license:x11-style "file://COPYRIGHT.txt") license:bsd-3))))
(define-public vulkan-tools
(package
--
2.41.0
D
[mesa-updates 08/13] gnu: volk: Update to vulkan-sdk-1.3.275.0.
(address . 69461@debbugs.gnu.org)
e243df7347ea70fe1d27c860e9a326dc0f3626e8.1709140055.git.i@dan.games
* gnu/packages/vulkan.scm (volk): Update to vulkan-sdk-1.3.275.0.

Change-Id: I19aa13158daccaed801b60226e829c3cb2044e8e
---
gnu/packages/vulkan.scm | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)

Toggle diff (35 lines)
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index 8e162402fa..807b0be8af 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -515,18 +515,18 @@ (define-public volk
(package
(name "volk")
(version %vulkan-sdk-version)
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/zeux/volk")
- (commit version)))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "0xaw3kg754mknx8lfj1p74a9npjfvdvlpicvn0hla4495zpc10rq"))))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/zeux/volk")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1zmr3wy0hc1hpwyifvjyxxfs7vc4ipqrfj0mav7cjdq6jf0cnf5r"))))
(build-system cmake-build-system)
(arguments
- '(#:tests? #f ;no test
+ '(#:tests? #f ;no test
#:configure-flags '("-DVOLK_INSTALL=ON" "-DVOLK_PULL_IN_VULKAN=ON")))
(inputs (list vulkan-headers))
(synopsis "Meta loader for Vulkan API")
--
2.41.0
D
[mesa-updates 09/13] gnu: vulkan-tools: Update to vulkan-sdk-1.3.275.0.
(address . 69461@debbugs.gnu.org)
617d4147db2b9bb37b94514cb79aaebf1fb5d5d5.1709140055.git.i@dan.games
* gnu/packages/vulkan.scm (vulkan-tools): Update to vulkan-sdk-1.3.275.0.
[arguments]: Turn on tests.
[arguments]<:#configure-flags>: Remove GLSLANG_INSTALL_DIR.
[native-inputs]: Add googletest.

Change-Id: I607c7ce414f8c0c8ee25ad0701d91771f5c4a7fc
---
gnu/packages/vulkan.scm | 26 +++++++++++++++-----------
1 file changed, 15 insertions(+), 11 deletions(-)

Toggle diff (42 lines)
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index 807b0be8af..82bc87dcd6 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -316,20 +316,24 @@ (define-public vulkan-tools
(url "https://github.com/KhronosGroup/Vulkan-Tools")
(commit version)))
(file-name (git-file-name name version))
+ (modules '((guix build utils)))
+ (snippet #~(substitute* "tests/icd/mock_icd_tests.cpp"
+ ;; Disable driver info test since it relies on git branch info
+ (("ASSERT_EQ\\(std::string\\(driver_properties\\.driverInfo\\)")
+ "// ASSERT_EQ(std::string(driver_properties.driverInfo)")))
(sha256
- (base32
- "0jzwjfx4c7y15wkwfhhc64rzljpi47bxrm5jw5blfsqjh8zsd27a"))))
+ (base32 "0g604gzzlqibnkjd18iss6iwn852nnsfrrgfnwn97khpr0xk1h6j"))))
(build-system cmake-build-system)
- (inputs
- (list glslang libxrandr vulkan-loader wayland wayland-protocols))
- (native-inputs
- (list pkg-config python vulkan-headers))
+ (inputs (list glslang libxrandr vulkan-loader wayland wayland-protocols))
+ (native-inputs (list googletest pkg-config python volk vulkan-headers))
(arguments
- `(#:tests? #f ;no tests
- #:configure-flags (list (string-append "-DGLSLANG_INSTALL_DIR="
- (assoc-ref %build-inputs "glslang")))))
- (home-page
- "https://github.com/KhronosGroup/Vulkan-Tools")
+ `(#:configure-flags (list "-DBUILD_TESTS=ON")
+ #:phases (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "./tests/vulkan_tools_tests")))))))
+ (home-page "https://github.com/KhronosGroup/Vulkan-Tools")
(synopsis "Tools and utilities for Vulkan")
(description
"Vulkan-Tools provides tools and utilities that can assist development by
--
2.41.0
D
[mesa-updates 10/13] gnu: magic-enum: Update to 0.9.5.
(address . 69461@debbugs.gnu.org)
28ec014c9c98fd17ed875d03b54daa191300e942.1709140055.git.i@dan.games
* gnu/packages/cpp.scm (magic-enum): Update to 0.9.5.

Change-Id: Ic9223ead920f99ec5fe0824681e5cbc845174cca
---
gnu/packages/cpp.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index e530d1d2a8..e8237c6cc1 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -1759,7 +1759,7 @@ (define-public atomic-queue
(define-public magic-enum
(package
(name "magic-enum")
- (version "0.7.3")
+ (version "0.9.5")
(home-page "https://github.com/Neargye/magic_enum")
(source (origin
(method git-fetch)
@@ -1769,7 +1769,7 @@ (define-public magic-enum
(file-name (git-file-name name version))
(sha256
(base32
- "1x47radgsifgz3vn2561mlvf4cq46ii33cpyqf01znm56iirwq89"))))
+ "14ys5sn2v1mai8bclvi81cp65g6jblqpdsi94639hphca5v8gka3"))))
(build-system cmake-build-system)
(synopsis "C++17 header only library for compile time reflection of enums")
(description "Magic Enum offers static reflection of enums, with
--
2.41.0
D
[mesa-updates 11/13] gnu: Add vulkan-utility-libraries.
(address . 69461@debbugs.gnu.org)
baf76c85e2751d6d157c16fa2f18dbbd00798fcb.1709140055.git.i@dan.games
* gnu/packages/vulkan.scm (vulkan-utility-libraries): New variable.

Change-Id: I618c1e25bb122deac543dbc6b7903c40a359f1a1
---
gnu/packages/vulkan.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (34 lines)
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index 82bc87dcd6..f8ffcddff3 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -572,3 +572,27 @@ (define-public vulkan-memory-allocator
(home-page
"https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator")
(license license:expat)))
+
+(define-public vulkan-utility-libraries
+ (package
+ (name "vulkan-utility-libraries")
+ (version %vulkan-sdk-version)
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/KhronosGroup/Vulkan-Utility-Libraries")
+ (commit version)))
+ (sha256
+ (base32 "11bqb18mvb9h7xv5d83b3mz43km7l1sa6jh47jir61pxfvwrmy42"))
+ (file-name (git-file-name name version))))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:configure-flags #~(list "-DBUILD_TESTS=ON")))
+ (inputs (list vulkan-headers))
+ (native-inputs (list googletest magic-enum))
+ (home-page "https://github.com/KhronosGroup/Vulkan-Utility-Libraries")
+ (synopsis "Utility libraries for Vulkan developers")
+ (description "Utility libraries for Vulkan developers.")
+ (license license:asl2.0)))
--
2.41.0
D
[mesa-updates 13/13] gnu: Add directx-shader-compiler.
(address . 69461@debbugs.gnu.org)
cf35dd023dbe78296d8972113c03c9a221b25a7f.1709140055.git.i@dan.games
* gnu/packages/vulkan.scm (directx-headers-for-dxc): New variable.
* gnu/packages/vulkan.scm (directx-shader-compiler): New variable.

Change-Id: I6e81f59ebd7122c007cce2df820359c055df5fd9
---
gnu/packages/vulkan.scm | 72 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 72 insertions(+)

Toggle diff (90 lines)
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index 599b0a47d3..2597f6d701 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -44,7 +44,9 @@ (define-module (gnu packages vulkan)
#:use-module (gnu packages llvm)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
+ #:use-module (gnu packages version-control)
#:use-module (gnu packages wine)
+ #:use-module (gnu packages xml)
#:use-module (gnu packages xorg))
(define %vulkan-sdk-version "vulkan-sdk-1.3.275.0")
@@ -582,3 +584,73 @@ (define-public vulkan-utility-libraries
(synopsis "Utility libraries for Vulkan developers")
(description "Utility libraries for Vulkan developers.")
(license license:asl2.0)))
+
+;; directx-shader-compiler depends on an old version of directx-headers.
+(define directx-headers-for-dxc
+ (let ((commit "980971e835876dc0cde415e8f9bc646e64667bf7")
+ (revision "115"))
+ (origin
+ (method git-fetch)
+ (uri (git-reference (url
+ "https://github.com/microsoft/DirectX-Headers.git")
+ (commit commit)))
+ (file-name (git-file-name "directx-headers-for-dxc"
+ (git-version "0" revision commit)))
+ (sha256 (base32 "0c7l2xdsbr132ga2nyqjhz9xa42dxvhh9idjxnl673mz5kab1j6h")))))
+
+(define-public directx-shader-compiler
+ ;; This commit drops the dependency on effcee.
+ (let ((commit "5f7834de562eeda3689fba0824008e1bcd7958b8")
+ (revision "0"))
+ (package
+ (name "directx-shader-compiler")
+ (version "1.7.2308")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/microsoft/DirectXShaderCompiler.git")
+ (commit commit)))
+ (file-name (git-file-name "directx-shader-compiler"
+ (git-version version revision commit)))
+ (sha256
+ (base32 "0awnn5qb9hci3pprl6p84y4hlh6xibgsv0vwp6sm6n7wn71z2cb9"))
+ (modules '((guix build utils)))
+ (snippet '(substitute* "CMakeLists.txt"
+ (("add_subdirectory\\(external\\)")
+ "find_package(SPIRV-Tools REQUIRED)
+find_package(SPIRV-Tools-opt CONFIG REQUIRED)")))))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:configure-flags #~(list "-G"
+ "Unix Makefiles"
+ "-C"
+ "../source/cmake/caches/PredefinedParams.cmake"
+ (string-append "-DSPIRV_HEADER_INCLUDE_DIR="
+ #$(this-package-input
+ "spirv-headers") "/include")
+ (string-append "-DSPIRV_TOOLS_INCLUDE_DIR="
+ #$(this-package-input
+ "spirv-tools") "/include")
+ (string-append "-DDIRECTX_HEADER_INCLUDE_DIR="
+ #$directx-headers-for-dxc
+ "/include"))
+ #:phases #~(modify-phases %standard-phases
+ (replace 'install
+ (lambda* (#:key make-flags outputs #:allow-other-keys)
+ (apply invoke "make" "install-distribution"
+ make-flags))))))
+ (inputs (list libxml2 spirv-headers spirv-tools))
+ (native-inputs (list git python))
+ (home-page "https://github.com/microsoft/DirectXShaderCompiler")
+ (synopsis
+ "Compiler and related tools used to compile High-Level Shader Language (HLSL)")
+ (description
+ "The DirectX Shader Compiler project includes a compiler and related
+tools used to compile High-Level Shader Language (HLSL) programs into DirectX
+Intermediate Language (DXIL) representation. Applications that make use of
+DirectX for graphics, games, and computation can use it to generate shader
+programs.")
+ (license license:ncsa))))
+
--
2.41.0
D
[mesa-updates 12/13] gnu: vulkan-validationlayers: Update to vulkan-sdk-1.3.275.0.
(address . 69461@debbugs.gnu.org)
0af764f02fe999685998050a65aa66c341238d50.1709140055.git.i@dan.games
* gnu/packages/vulkan.scm (vulkan-validationlayers): Update to
vulkan-sdk-1.3.275.0.
[source]: Add snippet.
[inputs]: Add robin-hood-hashing and vulkan-utility-libraries.
[arguments]: Remove configure-flags and update the reason why disable tests.

Change-Id: I01e25a974a0d4b4c672a621e07c46bdb17baab42
---
gnu/packages/vulkan.scm | 74 +++++++++++++++++------------------------
1 file changed, 30 insertions(+), 44 deletions(-)

Toggle diff (104 lines)
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index f8ffcddff3..599b0a47d3 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -37,6 +37,7 @@ (define-module (gnu packages vulkan)
#:use-module (gnu packages bison)
#:use-module (gnu packages check)
#:use-module (gnu packages cmake)
+ #:use-module (gnu packages cpp)
#:use-module (gnu packages freedesktop)
#:use-module (gnu packages gettext)
#:use-module (gnu packages gl)
@@ -453,60 +454,45 @@ (define-public vulkan-validationlayers
(package
(name "vulkan-validationlayers")
(version %vulkan-sdk-version)
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url
- "https://github.com/KhronosGroup/Vulkan-ValidationLayers")
- (commit version)))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "07djrk6yym4vl2b52wr09r8y649v5lark5hnr5rwvlxwxdmd9g75"))))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/KhronosGroup/Vulkan-ValidationLayers")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (modules '((guix build utils)))
+ ;; We don't build static libraries in SPIRV-Tools.
+ (snippet '(substitute* "tests/CMakeLists.txt"
+ (("-static")
+ "")))
+ (sha256
+ (base32 "0j39j43siz6jwqai8miy0hgcz5b4lln9xfhk1vzds21kgn17r744"))))
(build-system cmake-build-system)
(inputs (list glslang
libxrandr
mesa
+ robin-hood-hashing
shaderc
spirv-tools
vulkan-loader
+ vulkan-utility-libraries
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="
- (dirname (dirname
- (search-input-directory
- %build-inputs
- "include/glslang"))))
- (string-append "-DSPIRV_HEADERS_INSTALL_DIR="
- (dirname (dirname
- (search-input-directory
- %build-inputs
- "include/spirv"))))
- (string-append "-DSPIRV_TOOLS_INSTALL_DIR="
- (dirname (dirname
- (search-input-directory
- %build-inputs
- "include/spirv-tools"))))
- (string-append "-DVULKAN_HEADERS_INSTALL_DIR="
- (dirname (dirname
- (search-input-directory
- %build-inputs
- "include/vulkan"))))
- "-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\"")))))))))
+ (list
+ #:tests? #f ;Tests requires GPU driver
+ #: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
--
2.41.0
D
[mesa-updates 04/13] gnu: spirv-cross: Update to vulkan-sdk-1.3.275.0.
(address . 69461@debbugs.gnu.org)
363af38c9a04e02d0ee1485732e7342ff551896d.1709140055.git.i@dan.games
* gnu/packages/vulkan.scm (spirv-cross): Update to vulkan-sdk-1.3.275.0.

Change-Id: I936c999d8c97ab4024e505c1afdeba7baddeecfa
---
gnu/packages/vulkan.scm | 36 +++++++++++++++++-------------------
1 file changed, 17 insertions(+), 19 deletions(-)

Toggle diff (52 lines)
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index 3b485901d8..12baf52f92 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -124,28 +124,26 @@ (define-public spirv-cross
(url "https://github.com/KhronosGroup/SPIRV-Cross")
(commit version)))
(sha256
- (base32 "1ypbc1krkr0yywa1m976g3sjyb80l7hxwrnh6gp70w6va1dlnnn9"))
+ (base32 "0zdpgj0lv8kqzcna7y44qdjvxjifaxmmmcar835y4cdr35izf6ij"))
(file-name (git-file-name name version))))
(build-system cmake-build-system)
(arguments
- `(#:configure-flags
- (list "-DSPIRV_CROSS_SHARED=YES")
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'fix-tests-to-find-deps
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* "CMakeLists.txt"
- (("\\$\\{CMAKE_(.*)_DIR\\}/external/glslang(.*)/bin")
- (string-append (assoc-ref inputs "glslang") "/bin")))
- (substitute* "CMakeLists.txt"
- (("\\$\\{CMAKE_(.*)_DIR\\}/external/spirv-tools(.*)/bin")
- (string-append (assoc-ref inputs "spirv-tools") "/bin")))))
- (add-before 'check 'update-reference-shaders
- (lambda _
- (with-directory-excursion "../source"
- (invoke "./update_test_shaders.sh")))))))
- (inputs
- (list glslang spirv-headers spirv-tools))
+ `(#:configure-flags (list "-DSPIRV_CROSS_SHARED=YES")
+ #:phases (modify-phases %standard-phases
+ (add-after 'unpack 'fix-tests-to-find-deps
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "CMakeLists.txt"
+ (("\\$\\{CMAKE_(.*)_DIR\\}/external/glslang(.*)/bin")
+ (string-append (assoc-ref inputs "glslang") "/bin")))
+ (substitute* "CMakeLists.txt"
+ (("\\$\\{CMAKE_(.*)_DIR\\}/external/spirv-tools(.*)/bin")
+ (string-append (assoc-ref inputs "spirv-tools")
+ "/bin")))))
+ (add-before 'check 'update-reference-shaders
+ (lambda _
+ (with-directory-excursion "../source"
+ (invoke "./update_test_shaders.sh")))))))
+ (inputs (list glslang spirv-headers spirv-tools))
(native-inputs (list python))
(home-page "https://github.com/KhronosGroup/SPIRV-Cross")
(synopsis "Parser for and converter of SPIR-V to other shader languages")
--
2.41.0
D
[mesa-updates 02/13] gnu: spirv-tools: Update to vulkan-sdk-1.3.275.0.
(address . 69461@debbugs.gnu.org)
c6c671c2036f69f04571e0ee7d3f74f38b2bb7c3.1709140055.git.i@dan.games
* gnu/packages/vulkan.scm (spirv-tools): Update to vulkan-sdk-1.3.275.0.

Change-Id: Ibd28a26b60a14e6e8faabfe8ed09d93f6e5cafd5
---
gnu/packages/vulkan.scm | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)

Toggle diff (39 lines)
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index 2fb1884795..d29810f4c6 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -87,22 +87,22 @@ (define-public spirv-tools
(version %vulkan-sdk-version)
(source
(origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/KhronosGroup/SPIRV-Tools")
- (commit version)))
- (sha256
- (base32 "03d489ind2az7w7q1slj3mdc04372r3qqbnd7m9akxbg7yix1a5j"))
- (file-name (git-file-name name version))))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/KhronosGroup/SPIRV-Tools")
+ (commit version)))
+ (sha256
+ (base32 "1hmfhvswg66x7x2ww5gj3mhgh59kgp7pwv36xagwyhbm7fhayca7"))
+ (file-name (git-file-name name version))))
(build-system cmake-build-system)
(arguments
`(#:configure-flags (list "-DBUILD_SHARED_LIBS=ON"
;; Some packages like mpv fail to link
;; when the static libraries are built.
"-DSPIRV_TOOLS_BUILD_STATIC=OFF"
- (string-append
- "-DSPIRV-Headers_SOURCE_DIR="
- (assoc-ref %build-inputs "spirv-headers")))))
+ (string-append "-DSPIRV-Headers_SOURCE_DIR="
+ (assoc-ref %build-inputs
+ "spirv-headers")))))
(inputs (list spirv-headers))
(native-inputs (list pkg-config python))
(home-page "https://github.com/KhronosGroup/SPIRV-Tools")
--
2.41.0
D
retitle 69461 [PATCH mesa-updates 00/13] Update vulkan-sdk and add dirctx-shader-compiler.
(address . control@debbugs.gnu.org)
87cysddjzs.fsf@dan.games
retitle 69461 [PATCH mesa-updates 00/13] Update vulkan-sdk and
add dirctx-shader-compiler.
--
dan
J
J
John Kehayias wrote on 4 Mar 22:38 +0100
Re: Should commits rather be buildable or small
(name . Ricardo Wurmus)(address . rekado@elephly.net)
87jzmhad9s.fsf@protonmail.com
Hi everyone,

And sorry for reviving an old thread, but I am faced with a similar issue for updating vulkan, with the patch series submitted by dan (cc'ed): https://issues.guix.gnu.org/69461. I thought I would get some opinions here, please see below:

On Mon, Dec 11, 2023 at 12:51 PM, Ricardo Wurmus wrote:

Toggle quote (7 lines)
> Attila Lendvai <attila@lendvai.name> writes:
>
>> i myself also had headaches multiple times when i fixed something that
>> needed to touch several different packages, and they would only work
>> when applied in one transaction:
>>

In this case all the vulkan packages share a version through a variable name. I would assume packages wouldn't like mixed versions, but maybe some would work (I haven't tried). I'll be taking this series on mesa-updates with related changes, so the plan is that when it hits master there are no/few broken packages and full substitute coverage. So perhaps this makes this more of a style and convention question.

Some options:

1. Essentially squash to one commit where all of vulkan is updated in one commit. The main upside is that nothing should break (within vulkan, dependents to be fixed as needed) and it shows as "one" change; the main downside is that the proposed changes are not just trivial version bumps. Harder to then disentangle as needed.

2. Make each commit updating a package, but don't use the variable %vulkan-sdk-version, updating each package with a version as it is done. Then do a commit where all the versions are replaced by the variable. This seems like unnecessary work to me and while it stops the obvious breaking (source hashes don't match once variable is updated but package hasn't yet) versions are still mixed which is likely a problem.

3. Go with the series as proposed: this means after the first commit for sure all other vulkan packages and dependents don't build, as the source hashes won't match until the commit that updates that package. Along with version mixing, this perhaps doesn't give you a helpful git bisect either?

None are perfect. What do people think?

My instinct is to go with the series as proposed (after review) accepting that there will be for sure builds failing if time traveling to the middle of the series. I don't think we can really avoid that anyway, as sometimes we only see an issue after a commit and it is fixed some time later. We could have a note in the first commit that this requires the next n commits to update vulkan packages. That might help if someone is on an intermediate commit and can see quickly in git log this note.

Or perhaps we can note something is part of a dependent series when we make commits so this is easier for someone to tell in general?

Thanks!
John
D
4baeb31e-d8e7-4cef-944b-7214627d7905@dan.games
Hi John,

On 3/5/2024 5:38 AM, John Kehayias wrote:
Toggle quote (16 lines)
> In this case all the vulkan packages share a version through a variable name. I would assume packages wouldn't like mixed versions, but maybe some would work (I haven't tried). I'll be taking this series on mesa-updates with related changes, so the plan is that when it hits master there are no/few broken packages and full substitute coverage. So perhaps this makes this more of a style and convention question.
>
> Some options:
>
> 1. Essentially squash to one commit where all of vulkan is updated in one commit. The main upside is that nothing should break (within vulkan, dependents to be fixed as needed) and it shows as "one" change; the main downside is that the proposed changes are not just trivial version bumps. Harder to then disentangle as needed.
>
> 2. Make each commit updating a package, but don't use the variable %vulkan-sdk-version, updating each package with a version as it is done. Then do a commit where all the versions are replaced by the variable. This seems like unnecessary work to me and while it stops the obvious breaking (source hashes don't match once variable is updated but package hasn't yet) versions are still mixed which is likely a problem.
>
> 3. Go with the series as proposed: this means after the first commit for sure all other vulkan packages and dependents don't build, as the source hashes won't match until the commit that updates that package. Along with version mixing, this perhaps doesn't give you a helpful git bisect either?
>
> None are perfect. What do people think?
>
> My instinct is to go with the series as proposed (after review) accepting that there will be for sure builds failing if time traveling to the middle of the series. I don't think we can really avoid that anyway, as sometimes we only see an issue after a commit and it is fixed some time later. We could have a note in the first commit that this requires the next n commits to update vulkan packages. That might help if someone is on an intermediate commit and can see quickly in git log this note.
>
> Or perhaps we can note something is part of a dependent series when we make commits so this is easier for someone to tell in general?

I think to make each commit able to build, it's feasible to remove this
%vulkan-sdk-version variable. However, this doesn't fundamentally solve
the problem: when updating several packages in a patch series, some
packages might be broken since their dependencies are updated.

Another question is how should we treat vulkan packages. Some distros
package them on a per package basis (I see in Arch Linux, vulkan-headers
and vulkan-icd-loaders have version 1.3.276 while other packages like
spirv-headers has 1.3.275). I had to admit that I'm not that familiar
with vulkan packages, but I feel it's safer to keep their version
matched since each vulkan-sdk release makes sure every vulkan packages
are compatible with others. Thus, I prefer updating them in batch.

I think maybe it's a good option that we mark these commits are a series.

--
dan
L
L
Liliana Marie Prikler wrote on 5 Mar 06:19 +0100
f299fc0b5c8452a153f8d52d68dbd0d6e54066ca.camel@gmail.com
Hi,

Am Montag, dem 04.03.2024 um 21:38 +0000 schrieb John Kehayias:
Toggle quote (22 lines)
> [...]
> 1. Essentially squash to one commit where all of vulkan is updated in
> one commit. The main upside is that nothing should break (within
> vulkan, dependents to be fixed as needed) and it shows as "one"
> change; the main downside is that the proposed changes are not just
> trivial version bumps. Harder to then disentangle as needed.
>
> 2. Make each commit updating a package, but don't use the variable
> %vulkan-sdk-version, updating each package with a version as it is
> done. Then do a commit where all the versions are replaced by the
> variable. This seems like unnecessary work to me and while it stops
> the obvious breaking (source hashes don't match once variable is
> updated but package hasn't yet) versions are still mixed which is
> likely a problem.
>
> 3. Go with the series as proposed: this means after the first commit
> for sure all other vulkan packages and dependents don't build, as the
> source hashes won't match until the commit that updates that package.
> Along with version mixing, this perhaps doesn't give you a helpful
> git bisect either?
>
> None are perfect. What do people think?
I think 1 would be workable if the changes to the packages are minimal.
You should also check whether you can just do the version bumps and
then the other changes – or flip the order.

I don't really see the benefit with 2. Normally, we'd have "-next"
variants to catch nontrivial updates (among other things), but those
don't seem a good approach here.

If nothing else works, 3 is indeed an option to fall back to, albeit
begrudgingly. As noted for 1, you could check whether bumping all the
hashes and then only fixing whatever else for the builds is an option
here.

Alternative 4 would be to build those -next variants and then replace
the base vulkan all at once. This has the advantage of not doing any
version mixing in-between IIUC.


Cheers
D
[PATCH mesa-updates v2 0/1] gnu: Add directx-shader-compiler.
(address . 69461@debbugs.gnu.org)
cover.1710605074.git.i@dan.games
*** BLURB HERE ***

This v2 patch update direcx-shader-compiler to 1.8.2403, which is release
several days ago.

dan (1):
gnu: Add directx-shader-compiler.

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


base-commit: 6f05c96f9635da7ca9f421d03a6359ff3b1d1a95
prerequisite-patch-id: d2c827a47292c22f4808b9ae31b9ea2379f09d2d
prerequisite-patch-id: 7328244cc8c7178a6e122d7521d4ec42b1bf0888
prerequisite-patch-id: 108a388cd1e11057de47417a883f65bc53ded20a
prerequisite-patch-id: 5379655afbce71b5681fc929bdef8045dce8c4cd
prerequisite-patch-id: b2db37211901121736883a9c34c1052fa4ff8622
prerequisite-patch-id: 0043f79b15c6b80e29e45269538a24c548666428
prerequisite-patch-id: 46c858d89c2c67916c891623f905727e39112cad
prerequisite-patch-id: ca531e97e17fd3a4a158fb5b1558c97e9c7deb50
prerequisite-patch-id: 49e3377f59b1367647f59f8f1f9a9e1fb814a21c
prerequisite-patch-id: 5f3d93157507cd2f456ef089b32c98547c18d3d4
prerequisite-patch-id: d0c9e83a13a51199ad05a21e110201ba6b81440e
prerequisite-patch-id: e200ec734bde0452a7b3b770a0bd46b747ad037f
--
2.41.0
D
[PATCH mesa-updates v2 1/1] gnu: Add directx-shader-compiler.
(address . 69461@debbugs.gnu.org)
c2f04c1084b0be75c8e8749caa066d3e587d670f.1710605074.git.i@dan.games
* gnu/packages/vulkan.scm (directx-headers-for-dxc): New variable.
* gnu/packages/vulkan.scm (directx-shader-compiler): New variable.

Change-Id: I6e81f59ebd7122c007cce2df820359c055df5fd9
---
gnu/packages/vulkan.scm | 67 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 67 insertions(+)

Toggle diff (85 lines)
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index 599b0a47d3..517f26c173 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -44,7 +44,9 @@ (define-module (gnu packages vulkan)
#:use-module (gnu packages llvm)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
+ #:use-module (gnu packages version-control)
#:use-module (gnu packages wine)
+ #:use-module (gnu packages xml)
#:use-module (gnu packages xorg))
(define %vulkan-sdk-version "vulkan-sdk-1.3.275.0")
@@ -582,3 +584,68 @@ (define-public vulkan-utility-libraries
(synopsis "Utility libraries for Vulkan developers")
(description "Utility libraries for Vulkan developers.")
(license license:asl2.0)))
+
+;; directx-shader-compiler depends on an old version of directx-headers.
+(define directx-headers-for-dxc
+ (let ((commit "980971e835876dc0cde415e8f9bc646e64667bf7")
+ (revision "115"))
+ (origin
+ (method git-fetch)
+ (uri (git-reference (url
+ "https://github.com/microsoft/DirectX-Headers.git")
+ (commit commit)))
+ (file-name (git-file-name "directx-headers-for-dxc"
+ (git-version "0" revision commit)))
+ (sha256 (base32 "0c7l2xdsbr132ga2nyqjhz9xa42dxvhh9idjxnl673mz5kab1j6h")))))
+
+(define-public directx-shader-compiler
+ (package
+ (name "directx-shader-compiler")
+ (version "1.8.2403")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/microsoft/DirectXShaderCompiler.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0ckngd42ivz5cv5nqngkjwwlcxbcj9mcxps56zy7qnq4dmmqkiid"))
+ (modules '((guix build utils)))
+ (snippet '(substitute* "CMakeLists.txt"
+ (("add_subdirectory\\(external\\)")
+ "find_package(SPIRV-Tools REQUIRED)
+find_package(SPIRV-Tools-opt CONFIG REQUIRED)")))))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:configure-flags #~(list "-G"
+ "Unix Makefiles"
+ "-C"
+ "../source/cmake/caches/PredefinedParams.cmake"
+ (string-append "-DSPIRV_HEADER_INCLUDE_DIR="
+ #$(this-package-input
+ "spirv-headers") "/include")
+ (string-append "-DSPIRV_TOOLS_INCLUDE_DIR="
+ #$(this-package-input
+ "spirv-tools") "/include")
+ (string-append "-DDIRECTX_HEADER_INCLUDE_DIR="
+ #$directx-headers-for-dxc
+ "/include"))
+ #:phases #~(modify-phases %standard-phases
+ (replace 'install
+ (lambda* (#:key make-flags outputs #:allow-other-keys)
+ (apply invoke "make" "install-distribution"
+ make-flags))))))
+ (inputs (list libxml2 spirv-headers spirv-tools))
+ (native-inputs (list git python))
+ (home-page "https://github.com/microsoft/DirectXShaderCompiler")
+ (synopsis
+ "Compiler and related tools used to compile High-Level Shader Language (HLSL)")
+ (description
+ "The DirectX Shader Compiler project includes a compiler and related
+tools used to compile High-Level Shader Language (HLSL) programs into DirectX
+Intermediate Language (DXIL) representation. Applications that make use of
+DirectX for graphics, games, and computation can use it to generate shader
+programs.")
+ (license license:ncsa)))
--
2.41.0
D
tags 69461 patch
(address . control@debbugs.gnu.org)
788e0f88-5c2c-4a38-a07e-9ba4376f6f66@dan.games
tags 69461 patch

quit
D
retitle 69461
(address . control@debbugs.gnu.org)
4c871599-e730-4dcb-a73a-e675ecb5976e@dan.games
retitle 69461 [PATCH mesa-updates 00/13] Update vulkan-sdk and add
dirctx-shader-compiler.

quit
D
(address . control@debbugs.gnu.org)
d0ed0aed-7166-42fd-967f-f45cc7254eae@app.fastmail.com
retitle 69461 [PATCH mesa-updates 00/13] Update vulkan-sdk and add dirctx-shader-compiler.

quit
J
J
John Kehayias wrote on 25 Mar 02:15 +0100
Re: Should commits rather be buildable or small
87y1a7nmbx.fsf@protonmail.com
Hi,

Apologies for the delay. I would like to get things rolling on
mesa-updates and building, including the vulkan updates, so a choice
will have to be made :)

Thanks for the input so far!

On Tue, Mar 05, 2024 at 06:19 AM, Liliana Marie Prikler wrote:

Toggle quote (30 lines)
> Hi,
>
> Am Montag, dem 04.03.2024 um 21:38 +0000 schrieb John Kehayias:
>> [...]
>> 1. Essentially squash to one commit where all of vulkan is updated in
>> one commit. The main upside is that nothing should break (within
>> vulkan, dependents to be fixed as needed) and it shows as "one"
>> change; the main downside is that the proposed changes are not just
>> trivial version bumps. Harder to then disentangle as needed.
>>
>> 2. Make each commit updating a package, but don't use the variable
>> %vulkan-sdk-version, updating each package with a version as it is
>> done. Then do a commit where all the versions are replaced by the
>> variable. This seems like unnecessary work to me and while it stops
>> the obvious breaking (source hashes don't match once variable is
>> updated but package hasn't yet) versions are still mixed which is
>> likely a problem.
>>
>> 3. Go with the series as proposed: this means after the first commit
>> for sure all other vulkan packages and dependents don't build, as the
>> source hashes won't match until the commit that updates that package.
>> Along with version mixing, this perhaps doesn't give you a helpful
>> git bisect either?
>>
>> None are perfect. What do people think?
> I think 1 would be workable if the changes to the packages are minimal.
> You should also check whether you can just do the version bumps and
> then the other changes – or flip the order.
>

As currently proposed, the changes are not minimal.

dan: Do you know if just a version/hash bump is at least buildable? Or
are the changes necessary for the packages to build/function at all?
Or I guess if the non-version changes are applicable to the current
version first?

Toggle quote (10 lines)
> I don't really see the benefit with 2. Normally, we'd have "-next"
> variants to catch nontrivial updates (among other things), but those
> don't seem a good approach here.
>
> If nothing else works, 3 is indeed an option to fall back to, albeit
> begrudgingly. As noted for 1, you could check whether bumping all the
> hashes and then only fixing whatever else for the builds is an option
> here.
>

That's what I'll have to do I think, unless indeed the versions
changes can be made separately and still build. I can mark each patch
in the commit log that it is part of a series updating all the vulkan
packages. That might be something worth doing in general for cases
like this, to help out future time travelers and when e.g. searching
the log and finding a commit.

Toggle quote (5 lines)
> Alternative 4 would be to build those -next variants and then replace
> the base vulkan all at once. This has the advantage of not doing any
> version mixing in-between IIUC.
>

That's also an idea. Add a %vulkan-version-next or something like
that, and -next variants of all the packages using that version
instead. A bit clumsy and perhaps convoluted with the extra work for
maybe minimal gain.

I'll wait to see if dan has any information of what changes can be
made independently, but I guess I'll just have to make a decision on
mesa-updates.

Thanks!

John
D
cb447add-8add-47be-9728-b29c11b649cb@dan.games
Hi John,

On 3/25/2024 9:15 AM, John Kehayias wrote:
Toggle quote (5 lines)
> dan: Do you know if just a version/hash bump is at least buildable? Or
> are the changes necessary for the packages to build/function at all?
> Or I guess if the non-version changes are applicable to the current
> version first?

I'll give it a try tomorrow. I think if packages are updated in certain
sequence, it should be at least buildable. I'll give update or send a
new patch series if I have any progress on this.

--
dan
D
[PATCH mesa-updates v3 00/13] Update vulkan-sdk to 1.3.280.0 and add directx-shader-compiler.
(address . 69461@debbugs.gnu.org)(address . john.kehayias@protonmail.com)
cover.1711561863.git.i@dan.games
This updated patch series update vulkan packages to 1.3.280.0, which is
released a few weeks ago. This patch series also drops the unified version
number, and each vulkan-sdk package now use their own version number. What's
more, the version number is reverted to the old numbering style, dropping the
prefix from the version number.

I tried to enable tests for vulkan-validationlayers, but it seems the test
crashed. I kept the test-enabling code either way.

dan (13):
gnu: spirv-headers: Update to 1.3.280.0.
gnu: spirv-tools: Update to 1.3.280.0.
gnu: glslang: Update to 1.3.280.0.
gnu: spirv-cross: Update to 1.3.280.0.
gnu: shaderc: Update to 2024.0.
gnu: vulkan-headers: Update to 1.3.280.0.
gnu: vulkan-loader: Update to 1.3.280.0.
gnu: volk: Update to 1.3.280.0.
gnu: vulkan-tools: Update to 1.3.280.0.
gnu: magic-enum: Update to 0.9.5.
gnu: Add vulkan-utility-libraries.
gnu: vulkan-validationlayers: Update to 1.3.280.0.
gnu: Add directx-shader-compiler.

gnu/local.mk | 1 -
gnu/packages/cpp.scm | 5 +-
.../patches/glslang-install-static-libs.patch | 61 ----
gnu/packages/vulkan.scm | 262 ++++++++++++------
4 files changed, 181 insertions(+), 148 deletions(-)
delete mode 100644 gnu/packages/patches/glslang-install-static-libs.patch


base-commit: a223b1e52ba1db89b11a670915e8c9af3c3ac4af
--
2.41.0
D
[PATCH mesa-updates v3 01/13] gnu: spirv-headers: Update to 1.3.280.0.
(address . 69461@debbugs.gnu.org)(address . john.kehayias@protonmail.com)
b9a96c1349d342e1eeb0c03951cf3ad541a97695.1711561863.git.i@dan.games
* gnu/packages/vulkan.scm (spirv-headers): Update to 1.3.280.0.

Change-Id: I7a00d3c432a9f6901b3b91b7df2ded887b6101d1
---
gnu/packages/vulkan.scm | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

Toggle diff (35 lines)
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index 285d6be7f5..b4dfd191a9 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -5,7 +5,7 @@
;;; Copyright © 2020, 2023 Marius Bakke <marius@gnu.org>
;;; Copyright © 2021 Mathieu Othacehe <othacehe@gnu.org>
;;; Copyright © 2022 Kaelyn Takata <kaelyn.alexi@protonmail.com>
-;;; Copyright © 2022 dan <i@dan.games>
+;;; Copyright © 2022, 2024 dan <i@dan.games>
;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
;;;
;;; This file is part of GNU Guix.
@@ -52,16 +52,16 @@ (define %vulkan-sdk-version "sdk-1.3.231.1")
(define-public spirv-headers
(package
(name "spirv-headers")
- (version %vulkan-sdk-version)
+ (version "1.3.280.0")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/KhronosGroup/SPIRV-Headers")
- (commit version)))
+ (commit (string-append "vulkan-sdk-" version))))
(sha256
(base32
- "0z8b485hryya2g0jxv7amwg3fjj7pchbgnsa5ldf5fwgh5js0icm"))
+ "17jw5gwj2vmicyd6522b1zp7x551krfj826j0fg5kl0ixv0q08wk"))
(file-name (git-file-name name version))))
(build-system cmake-build-system)
(arguments
--
2.41.0
D
[PATCH mesa-updates v3 02/13] gnu: spirv-tools: Update to 1.3.280.0.
(address . 69461@debbugs.gnu.org)(address . john.kehayias@protonmail.com)
3902533ea4109ed9b772c767092456a5a6b6ffb5.1711561863.git.i@dan.games
* gnu/packages/vulkan.scm (spirv-tools): Update to 1.3.280.0.

Change-Id: Ie6e438849f8f59a4b7616ab05e81c4a76d64dd9e
---
gnu/packages/vulkan.scm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

Toggle diff (25 lines)
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index b4dfd191a9..ade0f65665 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -84,15 +84,15 @@ (define-public spirv-headers
(define-public spirv-tools
(package
(name "spirv-tools")
- (version %vulkan-sdk-version)
+ (version "1.3.280.0")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/KhronosGroup/SPIRV-Tools")
- (commit version)))
+ (commit (string-append "vulkan-sdk-" version))))
(sha256
- (base32 "03d489ind2az7w7q1slj3mdc04372r3qqbnd7m9akxbg7yix1a5j"))
+ (base32 "1sj84ngwcgmydlj88nx1a9jfmhmxlij7wc92khp8wf1vsfplayas"))
(file-name (git-file-name name version))))
(build-system cmake-build-system)
(arguments
--
2.41.0
D
[PATCH mesa-updates v3 03/13] gnu: glslang: Update to 1.3.280.0.
(address . 69461@debbugs.gnu.org)(address . john.kehayias@protonmail.com)
d9ca0bc3346a45016c8cfa5d6eef98e04c74e6c9.1711561863.git.i@dan.games
* gnu/packages/vulkan.scm (glslang): Update to 1.3.280.0.
[source]: Remove patch.
[arguments]: Run tests.
[inputs]: Add spirv-tools.
* gnu/packages/patches/glslang-install-static-libs.patch: Remove file.
* gnu/local.mk (dist_patch_DATA): Ungerister it.

Change-Id: I39ef23565e575179b292a1ab76d2d70c98f84767
---
gnu/local.mk | 1 -
.../patches/glslang-install-static-libs.patch | 61 -------------------
gnu/packages/vulkan.scm | 17 ++++--
3 files changed, 11 insertions(+), 68 deletions(-)
delete mode 100644 gnu/packages/patches/glslang-install-static-libs.patch

Toggle diff (119 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 5429dc498c..beec92e9fc 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1355,7 +1355,6 @@ dist_patch_DATA = \
%D%/packages/patches/glibc-2.29-git-updates.patch \
%D%/packages/patches/glibc-2.29-supported-locales.patch \
%D%/packages/patches/glibc-supported-locales.patch \
- %D%/packages/patches/glslang-install-static-libs.patch \
%D%/packages/patches/gmp-arm-asm-nothumb.patch \
%D%/packages/patches/gmp-faulty-test.patch \
%D%/packages/patches/gnash-fix-giflib-version.patch \
diff --git a/gnu/packages/patches/glslang-install-static-libs.patch b/gnu/packages/patches/glslang-install-static-libs.patch
deleted file mode 100644
index a155dde30e..0000000000
--- a/gnu/packages/patches/glslang-install-static-libs.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-Install OGLCompiler et.al. even when building shared libraries. Also fix
-CMake file locations.
-
-Patch taken from Gentoo:
-
- https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-util/glslang/files/glslang-1.3.231-Install-static-libs.patch
-
-diff --git a/OGLCompilersDLL/CMakeLists.txt b/OGLCompilersDLL/CMakeLists.txt
---- a/OGLCompilersDLL/CMakeLists.txt
-+++ b/OGLCompilersDLL/CMakeLists.txt
-@@ -41,7 +41,7 @@ if(WIN32)
- source_group("Source" FILES ${SOURCES})
- endif(WIN32)
-
--if(ENABLE_GLSLANG_INSTALL AND NOT BUILD_SHARED_LIBS)
-+if(ENABLE_GLSLANG_INSTALL)
- install(TARGETS OGLCompiler EXPORT glslang-targets)
-
- # Backward compatibility
-@@ -49,7 +49,7 @@ if(ENABLE_GLSLANG_INSTALL AND NOT BUILD_SHARED_LIBS)
- message(WARNING \"Using `OGLCompilerTargets.cmake` is deprecated: use `find_package(glslang)` to find glslang CMake targets.\")
-
- if (NOT TARGET glslang::OGLCompiler)
-- include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/glslang-targets.cmake\")
-+ include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\")
- endif()
-
- add_library(OGLCompiler ALIAS glslang::OGLCompiler)
-diff --git a/glslang/CMakeLists.txt b/glslang/CMakeLists.txt
---- a/glslang/CMakeLists.txt
-+++ b/glslang/CMakeLists.txt
-@@ -203,7 +203,7 @@ endif()
- ################################################################################
- if(ENABLE_GLSLANG_INSTALL)
- install(TARGETS glslang EXPORT glslang-targets)
-- if(NOT BUILD_SHARED_LIBS)
-+ if(BUILD_SHARED_LIBS)
- install(TARGETS MachineIndependent EXPORT glslang-targets)
- install(TARGETS GenericCodeGen EXPORT glslang-targets)
-
-diff --git a/glslang/OSDependent/Unix/CMakeLists.txt b/glslang/OSDependent/Unix/CMakeLists.txt
---- a/glslang/OSDependent/Unix/CMakeLists.txt
-+++ b/glslang/OSDependent/Unix/CMakeLists.txt
-@@ -52,7 +52,7 @@ else()
- target_link_libraries(OSDependent Threads::Threads)
- endif()
-
--if(ENABLE_GLSLANG_INSTALL AND NOT BUILD_SHARED_LIBS)
-+if(ENABLE_GLSLANG_INSTALL)
- install(TARGETS OSDependent EXPORT glslang-targets)
-
- # Backward compatibility
-@@ -60,7 +60,7 @@ if(ENABLE_GLSLANG_INSTALL AND NOT BUILD_SHARED_LIBS)
- message(WARNING \"Using `OSDependentTargets.cmake` is deprecated: use `find_package(glslang)` to find glslang CMake targets.\")
-
- if (NOT TARGET glslang::OSDependent)
-- include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/glslang-targets.cmake\")
-+ include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\")
- endif()
-
- add_library(OSDependent ALIAS glslang::OSDependent)
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index ade0f65665..499165f581 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -189,22 +189,27 @@ (define-public spirv-llvm-translator
(define-public glslang
(package
(name "glslang")
- (version %vulkan-sdk-version)
+ (version "1.3.280.0")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/KhronosGroup/glslang")
- (commit version)))
- (patches (search-patches "glslang-install-static-libs.patch"))
+ (commit (string-append "vulkan-sdk-" version))))
(sha256
(base32
- "12a1zl8qxa28nbf6m67260c0lwdw3bqbj0jz1382wgm5px1fpqw6"))
+ "1vvgqvwhsimlz8wkk38b9cvp9abggq840iws8al0znzz3mnvkfdn"))
(file-name (git-file-name name version))))
(build-system cmake-build-system)
(arguments
- '(#:tests? #f ;FIXME: requires bundled SPIRV-Tools
- #:configure-flags '("-DBUILD_SHARED_LIBS=ON")))
+ '(#:configure-flags '("-DBUILD_SHARED_LIBS=ON"
+ "-DALLOW_EXTERNAL_SPIRV_TOOLS=ON")
+ #:phases (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "ctest")))))))
+ (inputs (list spirv-tools))
(native-inputs
(list pkg-config python))
(home-page "https://github.com/KhronosGroup/glslang")
--
2.41.0
D
[PATCH mesa-updates v3 04/13] gnu: spirv-cross: Update to 1.3.280.0.
(address . 69461@debbugs.gnu.org)(address . john.kehayias@protonmail.com)
5cc37c6a8577c587bdd3d4f61900caa38fd24b51.1711561863.git.i@dan.games
* gnu/packages/vulkan.scm (spirv-cross): Update to 1.3.280.0.

Change-Id: Ie8e45c6892892c02e3d970a831044ff9f70a9547
---
gnu/packages/vulkan.scm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

Toggle diff (25 lines)
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index 499165f581..038a896803 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -116,15 +116,15 @@ (define-public spirv-tools
(define-public spirv-cross
(package
(name "spirv-cross")
- (version %vulkan-sdk-version)
+ (version "1.3.280.0")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/KhronosGroup/SPIRV-Cross")
- (commit version)))
+ (commit (string-append "vulkan-sdk-" version))))
(sha256
- (base32 "1ypbc1krkr0yywa1m976g3sjyb80l7hxwrnh6gp70w6va1dlnnn9"))
+ (base32 "1k6fbkradknxis85akzzksz9ipm3v42xvrzaamwj2lrgfm8d6r4d"))
(file-name (git-file-name name version))))
(build-system cmake-build-system)
(arguments
--
2.41.0
D
[PATCH mesa-updates v3 05/13] gnu: shaderc: Update to 2024.0.
(address . 69461@debbugs.gnu.org)(address . john.kehayias@protonmail.com)
dc368526d4752d4f0b4aa276ee8b8ac9af986c6e.1711561863.git.i@dan.games
* gnu/packages/vulkan.scm (shaderc): Update to 2024.0.
[arguments]<#:configure-flags>: Specify python executable.
<#:phases>: Remove drop-additional-glslang-deps phase.
[inputs]: Remove python.
[native-inputs]: Add python.

Change-Id: I3ca4b6560288f4b8ea9440a7fd0a7815b67471d8
---
gnu/packages/vulkan.scm | 24 ++++++++++--------------
1 file changed, 10 insertions(+), 14 deletions(-)

Toggle diff (59 lines)
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index 038a896803..ef6e4b454f 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -359,7 +359,7 @@ (define-public shaderc
(package
(name "shaderc")
;; shaderc doesn't follow the versioning scheme of vulkan sdk
- (version "2022.3")
+ (version "2024.0")
(source
(origin
(method git-fetch)
@@ -369,13 +369,18 @@ (define-public shaderc
(file-name (git-file-name name version))
(sha256
(base32
- "0sdbfi66zmqj0c5q5yv2zvcvry7557yzgxk2mwflyjgqh7kdhb8d"))))
+ "1m5jncn6y8c6g83f8nwh86hz33mvv03x7fyr5zq0ynwanrcpn2hb"))))
(build-system cmake-build-system)
(arguments
`(;; FIXME: Skip most of the tests, because enabling system gtest breaks
;; the build: <https://github.com/google/shaderc/issues/470>.
#:configure-flags
(list "-DSHADERC_SKIP_TESTS=ON"
+ ;; The two flags are copied from:
+ ;; https://sdk.lunarg.com/sdk/download/1.3.280.0/linux/config.json
+ "-DSHADERC_ENABLE_SHARED_CRT=ON"
+ "-DSHADERC_SKIP_COPYRIGHT_CHECK=ON"
+ "-DPYTHON_EXECUTABLE=python3"
;; Note: despite the name, this just specifies the headers.
(string-append "-Dglslang_SOURCE_DIR="
(assoc-ref %build-inputs "glslang") "/include/glslang"))
@@ -401,20 +406,11 @@ (define-public shaderc
,version
,(package-version spirv-tools)
,(package-version glslang))))
- #t))
- ;; see: https://github.com/google/shaderc/pull/1276
- (add-after 'do-not-look-for-bundled-sources 'drop-additional-glslang-deps
- (lambda _
- (substitute* "glslc/CMakeLists.txt"
- (("OSDependent OGLCompiler") ""))
- (substitute* "libshaderc/CMakeLists.txt"
- (("OSDependent OGLCompiler") ""))
- (substitute* "libshaderc_util/CMakeLists.txt"
- (("OSDependent OGLCompiler") "")))))))
+ #t)))))
(inputs
- (list glslang python spirv-headers spirv-tools))
+ (list glslang spirv-headers spirv-tools))
(native-inputs
- (list pkg-config))
+ (list pkg-config python))
(home-page "https://github.com/google/shaderc")
(synopsis "Tools for shader compilation")
(description "Shaderc is a collection of tools, libraries, and tests for
--
2.41.0
D
[PATCH mesa-updates v3 06/13] gnu: vulkan-headers: Update to 1.3.280.0.
(address . 69461@debbugs.gnu.org)(address . john.kehayias@protonmail.com)
3537c17756cf185ef5b83d7fe0f1c7626ab0260f.1711561863.git.i@dan.games
* gnu/packages/vulkan.scm (vulkan-headers): Update to 1.3.280.0.

Change-Id: Ie4c135fd53a9cacb36e766daba9524ce33fa5630
---
gnu/packages/vulkan.scm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

Toggle diff (27 lines)
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index ef6e4b454f..3324e8bf45 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -227,17 +227,17 @@ (define-public glslang
(define-public vulkan-headers
(package
(name "vulkan-headers")
- (version %vulkan-sdk-version)
+ (version "1.3.280.0")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/KhronosGroup/Vulkan-Headers")
- (commit version)))
+ (commit (string-append "vulkan-sdk-" version))))
(file-name (git-file-name name version))
(sha256
(base32
- "167zdank6pn66mzjdwgrdlmhmsy4v2k0nhw0nwg649k863rgi00j"))))
+ "13mmv5621z73hlfnsrccbcb4z0d7kwj92a081701vbpss45a4whj"))))
(build-system cmake-build-system)
(arguments
`(#:tests? #f)) ; No tests.
--
2.41.0
D
[PATCH mesa-updates v3 07/13] gnu: vulkan-loader: Update to 1.3.280.0.
(address . 69461@debbugs.gnu.org)(address . john.kehayias@protonmail.com)
18e4585ccf2c39b8905de5e679be296c7cc3bde1.1711561863.git.i@dan.games
* gnu/packages/vulkan.scm (vulkan-loader): Update to 1.3.280.0.
[arguments]<#:phases>: Change the place setting system googletest.
[native-search-paths]: export XDG_DATA_DIRS.

Change-Id: Ib270eeeea6500691a75c36612104c7ddb1c28dfb
---
gnu/packages/vulkan.scm | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)

Toggle diff (55 lines)
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index 3324e8bf45..14e50c59c6 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -251,19 +251,17 @@ (define-public vulkan-headers
(define-public vulkan-loader
(package
(name "vulkan-loader")
- ;; XXX: Take a slightly newer commit to fix a test failure on i686:
- ;; https://github.com/KhronosGroup/Vulkan-Loader/pull/1036
- (version "sdk-1.3.232")
+ (version "1.3.280.0")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/KhronosGroup/Vulkan-Loader")
- (commit "v1.3.232")))
+ (commit (string-append "vulkan-sdk-" version))))
(file-name (git-file-name name version))
(sha256
(base32
- "0w69sh669sx9pwlvv2rv92ds2hm2rbzsa6qqcmd8kcad0qfq7dz2"))))
+ "0glix3clqkdbi9kqcp8abmglqpgjd2r2bjqvi11r8sair0z54hnf"))))
(build-system cmake-build-system)
(arguments
(list
@@ -291,11 +289,9 @@ (define-public vulkan-loader
(string-append "includedir=" vulkan-headers "\n"))))))
(add-after 'unpack 'use-system-googletest
(lambda _
- ;; Inform the build system that googletest is already built.
- (substitute* "CMakeLists.txt"
- ((".*if\\(TARGET gtest\\)")
- (string-append " find_package(GTest REQUIRED)\n"
- " if(true)")))
+ (substitute* "tests/CMakeLists.txt"
+ (("message\\(FATAL_ERROR \"Could not find googletest directory. See BUILD.md\"\\)")
+ "find_package(GTest REQUIRED)"))
;; Use the namespaced variable.
(substitute* "tests/framework/CMakeLists.txt"
(("PUBLIC gtest ")
@@ -308,6 +304,10 @@ (define-public vulkan-loader
wayland))
(inputs
(list vulkan-headers libxrandr))
+ (native-search-paths
+ (list (search-path-specification
+ (variable "XDG_DATA_DIRS")
+ (files '("share")))))
(home-page
"https://github.com/KhronosGroup/Vulkan-Loader")
(synopsis "Khronos official ICD loader and validation layers for Vulkan")
--
2.41.0
D
[PATCH mesa-updates v3 08/13] gnu: volk: Update to 1.3.280.0.
(address . 69461@debbugs.gnu.org)(address . john.kehayias@protonmail.com)
29de178f1dbebe1d817f8855d79542364c0ecd7d.1711561863.git.i@dan.games
* gnu/packages/vulkan.scm (volk): Update to 1.3.280.0.

Change-Id: I4f72df2ba6784f3dae93cf60361e1bceaf61d3bb
---
gnu/packages/vulkan.scm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

Toggle diff (26 lines)
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index 14e50c59c6..c6d3d3d347 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -535,16 +535,16 @@ (define-public vulkan-validationlayers
(define-public volk
(package
(name "volk")
- (version %vulkan-sdk-version)
+ (version "1.3.280.0")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/zeux/volk")
- (commit version)))
+ (commit (string-append "vulkan-sdk-" version))))
(file-name (git-file-name name version))
(sha256
(base32
- "0xaw3kg754mknx8lfj1p74a9npjfvdvlpicvn0hla4495zpc10rq"))))
+ "0x4jhc8n9c4k8svmmcaxxs613xbsav7wam94gacddlm738cwp13v"))))
(build-system cmake-build-system)
(arguments
'(#:tests? #f ;no test
--
2.41.0
D
[PATCH mesa-updates v3 09/13] gnu: vulkan-tools: Update to 1.3.280.0.
(address . 69461@debbugs.gnu.org)(address . john.kehayias@protonmail.com)
28d6db476c6a195925f0b4d2866facacefdec770.1711561863.git.i@dan.games
* gnu/packages/vulkan.scm (vulkan-tools): Update to 1.3.280.0.
[arguments]: Turn on tests.
[arguments]<:#configure-flags>: Remove GLSLANG_INSTALL_DIR.
[native-inputs]: Add googletest.

Change-Id: Iadf98fc95d0d70c3780159992ebc2fdff6a2d108
---
gnu/packages/vulkan.scm | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)

Toggle diff (48 lines)
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index c6d3d3d347..dfd8f73d9b 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -326,26 +326,34 @@ (define-public vulkan-loader
(define-public vulkan-tools
(package
(name "vulkan-tools")
- (version %vulkan-sdk-version)
+ (version "1.3.280.0")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/KhronosGroup/Vulkan-Tools")
- (commit version)))
+ (commit (string-append "vulkan-sdk-" version))))
(file-name (git-file-name name version))
+ (modules '((guix build utils)))
+ (snippet #~(substitute* "tests/icd/mock_icd_tests.cpp"
+ ;; Disable driver info test since it relies on git branch info
+ (("ASSERT_EQ\\(std::string\\(driver_properties\\.driverInfo\\)")
+ "// ASSERT_EQ(std::string(driver_properties.driverInfo)")))
(sha256
(base32
- "0jzwjfx4c7y15wkwfhhc64rzljpi47bxrm5jw5blfsqjh8zsd27a"))))
+ "0w0m04vscr4a6vr682g3mn7mfni740cmai9ylzlgfdggb77y58xz"))))
(build-system cmake-build-system)
(inputs
(list glslang libxrandr vulkan-loader wayland wayland-protocols))
(native-inputs
- (list pkg-config python vulkan-headers))
+ (list googletest pkg-config python volk vulkan-headers))
(arguments
- `(#:tests? #f ;no tests
- #:configure-flags (list (string-append "-DGLSLANG_INSTALL_DIR="
- (assoc-ref %build-inputs "glslang")))))
+ `(#:configure-flags (list "-DBUILD_TESTS=ON")
+ #:phases (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "./tests/vulkan_tools_tests")))))))
(home-page
"https://github.com/KhronosGroup/Vulkan-Tools")
(synopsis "Tools and utilities for Vulkan")
--
2.41.0
D
[PATCH mesa-updates v3 10/13] gnu: magic-enum: Update to 0.9.5.
(address . 69461@debbugs.gnu.org)(address . john.kehayias@protonmail.com)
016b1a765e31297919aa133a66a39871118a49c3.1711561863.git.i@dan.games
* gnu/packages/cpp.scm (magic-enum): Update to 0.9.5.

Change-Id: I8306d7ef69276e33f7daada895165a88bfc938ad
---
gnu/packages/cpp.scm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

Toggle diff (32 lines)
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index acbe3e4836..cfff141dcc 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -39,6 +39,7 @@
;;; Copyright © 2023 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
;;; Copyright © 2023 Foundation Devices, Inc. <hello@foundationdevices.com>
;;; Copyright © 2023 Paul A. Patience <paul@apatience.com>
+;;; Copyright © 2024 dan <i@dan.games>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1795,7 +1796,7 @@ (define-public atomic-queue
(define-public magic-enum
(package
(name "magic-enum")
- (version "0.7.3")
+ (version "0.9.5")
(home-page "https://github.com/Neargye/magic_enum")
(source (origin
(method git-fetch)
@@ -1805,7 +1806,7 @@ (define-public magic-enum
(file-name (git-file-name name version))
(sha256
(base32
- "1x47radgsifgz3vn2561mlvf4cq46ii33cpyqf01znm56iirwq89"))))
+ "14ys5sn2v1mai8bclvi81cp65g6jblqpdsi94639hphca5v8gka3"))))
(build-system cmake-build-system)
(synopsis "C++17 header only library for compile time reflection of enums")
(description "Magic Enum offers static reflection of enums, with
--
2.41.0
D
[PATCH mesa-updates v3 11/13] gnu: Add vulkan-utility-libraries.
(address . 69461@debbugs.gnu.org)(address . john.kehayias@protonmail.com)
75fce4aad0cbf3e8f2c271afa00419ed33651de2.1711561863.git.i@dan.games
* gnu/packages/vulkan.scm (vulkan-utility-libraries): New variable.

Change-Id: I5a7c3fa51150e2181197316f6b97a54f12a24236
---
gnu/packages/vulkan.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (42 lines)
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index dfd8f73d9b..6239f7ea4d 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -37,6 +37,7 @@ (define-module (gnu packages vulkan)
#:use-module (gnu packages bison)
#:use-module (gnu packages check)
#:use-module (gnu packages cmake)
+ #:use-module (gnu packages cpp)
#:use-module (gnu packages freedesktop)
#:use-module (gnu packages gettext)
#:use-module (gnu packages gl)
@@ -597,3 +598,27 @@ (define-public vulkan-memory-allocator
(home-page
"https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator")
(license license:expat)))
+
+(define-public vulkan-utility-libraries
+ (package
+ (name "vulkan-utility-libraries")
+ (version "1.3.280.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/KhronosGroup/Vulkan-Utility-Libraries")
+ (commit (string-append "vulkan-sdk-" version))))
+ (sha256
+ (base32 "17fmalilczs4x435f8kdx8bf0x5mnjhkmcp34xap8lanpbyzs84q"))
+ (file-name (git-file-name name version))))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:configure-flags #~(list "-DBUILD_TESTS=ON")))
+ (inputs (list vulkan-headers))
+ (native-inputs (list googletest magic-enum))
+ (home-page "https://github.com/KhronosGroup/Vulkan-Utility-Libraries")
+ (synopsis "Utility libraries for Vulkan developers")
+ (description "Utility libraries for Vulkan developers.")
+ (license license:asl2.0)))
--
2.41.0
D
[PATCH mesa-updates v3 12/13] gnu: vulkan-validationlayers: Update to 1.3.280.0.
(address . 69461@debbugs.gnu.org)(address . john.kehayias@protonmail.com)
435c72f590aa854b9072c5967eabfd1cbc6c8bcb.1711561863.git.i@dan.games
* gnu/packages/vulkan.scm (vulkan-validationlayers): Update to 1.3.280.0.
[source]: Add snippet.
[inputs]: Add robin-hood-hashing and vulkan-utility-libraries.
[arguments]: Remove configure-flags, replace check step, and update reason
why disabling tests.

Change-Id: I80ca002d8dbe71cad57f859ee34ac8f10e175907
---
gnu/packages/vulkan.scm | 55 ++++++++++++++++++-----------------------
1 file changed, 24 insertions(+), 31 deletions(-)

Toggle diff (100 lines)
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index 6239f7ea4d..1016e9db36 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -47,9 +47,6 @@ (define-module (gnu packages vulkan)
#:use-module (gnu packages wine)
#:use-module (gnu packages xorg))
-;; Note: Remember to change vulkan-loader version when bumping this.
-(define %vulkan-sdk-version "sdk-1.3.231.1")
-
(define-public spirv-headers
(package
(name "spirv-headers")
@@ -478,51 +475,37 @@ (define-public vkd3d
(define-public vulkan-validationlayers
(package
(name "vulkan-validationlayers")
- (version %vulkan-sdk-version)
+ (version "1.3.280.0")
(source (origin
(method git-fetch)
(uri (git-reference
(url
"https://github.com/KhronosGroup/Vulkan-ValidationLayers")
- (commit version)))
+ (commit (string-append "vulkan-sdk-" version))))
(file-name (git-file-name name version))
+ (modules '((guix build utils)))
+ ;; We don't build static libraries in SPIRV-Tools.
+ (snippet '(substitute* "tests/CMakeLists.txt"
+ (("-static")
+ "")))
(sha256
(base32
- "07djrk6yym4vl2b52wr09r8y649v5lark5hnr5rwvlxwxdmd9g75"))))
+ "1w6fsaicrgnzkj5vz2v86a2gk1n7478q6n66ac2920avnin9a64c"))))
(build-system cmake-build-system)
(inputs (list glslang
libxrandr
mesa
+ robin-hood-hashing
shaderc
spirv-tools
vulkan-loader
+ vulkan-utility-libraries
wayland))
- (native-inputs (list pkg-config python spirv-headers vulkan-headers))
+ (native-inputs (list googletest pkg-config python spirv-headers vulkan-headers))
(arguments
- (list #:tests? #f ;no tests
+ (list #:tests? #f ; test crashed
#:configure-flags
- #~(list "-DUSE_ROBIN_HOOD_HASHING=OFF"
- (string-append "-DGLSLANG_INSTALL_DIR="
- (dirname (dirname
- (search-input-directory
- %build-inputs
- "include/glslang"))))
- (string-append "-DSPIRV_HEADERS_INSTALL_DIR="
- (dirname (dirname
- (search-input-directory
- %build-inputs
- "include/spirv"))))
- (string-append "-DSPIRV_TOOLS_INSTALL_DIR="
- (dirname (dirname
- (search-input-directory
- %build-inputs
- "include/spirv-tools"))))
- (string-append "-DVULKAN_HEADERS_INSTALL_DIR="
- (dirname (dirname
- (search-input-directory
- %build-inputs
- "include/vulkan"))))
- "-Wno-dev")
+ #~(list "-DBUILD_TESTS=ON")
#:phases #~(modify-phases %standard-phases
(add-after 'install 'set-layer-path-in-manifest
(lambda _
@@ -532,7 +515,17 @@ (define-public vulkan-validationlayers
(substitute* manifest
(("\"libVkLayer_khronos_validation.so\"")
(string-append "\"" #$output
- "/lib/libVkLayer_khronos_validation.so\"")))))))))
+ "/lib/libVkLayer_khronos_validation.so\""))))))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (setenv "VK_LAYER_PATH" (string-append (getcwd) "/layers"))
+ (setenv "LD_LIBRARY_PATH"
+ (string-append #$(this-package-input "vulkan-loader") "/lib"))
+ (setenv "MESA_SHADER_CACHE_DIR"
+ (string-append (getcwd) "/shader-cache"))
+ (setenv "XDG_RUNTIME_DIR" (getcwd))
+ (invoke "./tests/vk_layer_validation_tests")))))))
(home-page "https://github.com/KhronosGroup/Vulkan-ValidationLayers")
(synopsis "Khronos official validation layers for Vulkan")
(description
--
2.41.0
D
[PATCH mesa-updates v3 13/13] gnu: Add directx-shader-compiler.
(address . 69461@debbugs.gnu.org)(address . john.kehayias@protonmail.com)
85c049f7241ecdb209022a8a473b5fc0baa6643d.1711561863.git.i@dan.games
* gnu/packages/vulkan.scm (directx-shader-compiler): New variable.

Change-Id: I3d7ae6da3f6d6394d559c3cc2676be4d477e6b1e
---
gnu/packages/vulkan.scm | 67 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 67 insertions(+)

Toggle diff (85 lines)
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index 1016e9db36..35f2339e43 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -44,7 +44,9 @@ (define-module (gnu packages vulkan)
#:use-module (gnu packages llvm)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
+ #:use-module (gnu packages version-control)
#:use-module (gnu packages wine)
+ #:use-module (gnu packages xml)
#:use-module (gnu packages xorg))
(define-public spirv-headers
@@ -615,3 +617,68 @@ (define-public vulkan-utility-libraries
(synopsis "Utility libraries for Vulkan developers")
(description "Utility libraries for Vulkan developers.")
(license license:asl2.0)))
+
+;; directx-shader-compiler depends on an old version of directx-headers.
+(define directx-headers-for-dxc
+ (let ((commit "980971e835876dc0cde415e8f9bc646e64667bf7")
+ (revision "115"))
+ (origin
+ (method git-fetch)
+ (uri (git-reference (url
+ "https://github.com/microsoft/DirectX-Headers")
+ (commit commit)))
+ (file-name (git-file-name "directx-headers-for-dxc"
+ (git-version "0" revision commit)))
+ (sha256 (base32 "0c7l2xdsbr132ga2nyqjhz9xa42dxvhh9idjxnl673mz5kab1j6h")))))
+
+(define-public directx-shader-compiler
+ (package
+ (name "directx-shader-compiler")
+ (version "1.8.2403.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/microsoft/DirectXShaderCompiler")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "14nd4ys0x14z17l5fkaysc9a1gfw3fmdj8gvxw1a013yg6fla7g3"))
+ (modules '((guix build utils)))
+ (snippet '(substitute* "CMakeLists.txt"
+ (("add_subdirectory\\(external\\)")
+ "find_package(SPIRV-Tools REQUIRED)
+find_package(SPIRV-Tools-opt CONFIG REQUIRED)")))))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:configure-flags #~(list "-G"
+ "Unix Makefiles"
+ "-C"
+ "../source/cmake/caches/PredefinedParams.cmake"
+ (string-append "-DSPIRV_HEADER_INCLUDE_DIR="
+ #$(this-package-input
+ "spirv-headers") "/include")
+ (string-append "-DSPIRV_TOOLS_INCLUDE_DIR="
+ #$(this-package-input
+ "spirv-tools") "/include")
+ (string-append "-DDIRECTX_HEADER_INCLUDE_DIR="
+ #$directx-headers-for-dxc
+ "/include"))
+ #:phases #~(modify-phases %standard-phases
+ (replace 'install
+ (lambda* (#:key make-flags outputs #:allow-other-keys)
+ (apply invoke "make" "install-distribution"
+ make-flags))))))
+ (inputs (list libxml2 spirv-headers spirv-tools))
+ (native-inputs (list git python))
+ (home-page "https://github.com/microsoft/DirectXShaderCompiler")
+ (synopsis
+ "Compiler and related tools used to compile High-Level Shader Language (HLSL)")
+ (description
+ "The DirectX Shader Compiler project includes a compiler and related
+tools used to compile High-Level Shader Language (HLSL) programs into DirectX
+Intermediate Language (DXIL) representation. Applications that make use of
+DirectX for graphics, games, and computation can use it to generate shader
+programs.")
+ (license license:ncsa)))
--
2.41.0
J
J
John Kehayias wrote on 18 Apr 06:54 +0200
Re: [bug#69461] [PATCH mesa-updates v3 00/13] Update vulkan-sdk to 1.3.280.0 and add directx-shader-compiler.
(name . dan)(address . i@dan.games)(address . 69461@debbugs.gnu.org)
87sezj1da0.fsf@protonmail.com
Hi Dan,

On Thu, Mar 28, 2024 at 11:54 AM, dan wrote:

Toggle quote (34 lines)
> This updated patch series update vulkan packages to 1.3.280.0, which is
> released a few weeks ago. This patch series also drops the unified version
> number, and each vulkan-sdk package now use their own version number. What's
> more, the version number is reverted to the old numbering style, dropping the
> prefix from the version number.
>
> I tried to enable tests for vulkan-validationlayers, but it seems the test
> crashed. I kept the test-enabling code either way.
>
> dan (13):
> gnu: spirv-headers: Update to 1.3.280.0.
> gnu: spirv-tools: Update to 1.3.280.0.
> gnu: glslang: Update to 1.3.280.0.
> gnu: spirv-cross: Update to 1.3.280.0.
> gnu: shaderc: Update to 2024.0.
> gnu: vulkan-headers: Update to 1.3.280.0.
> gnu: vulkan-loader: Update to 1.3.280.0.
> gnu: volk: Update to 1.3.280.0.
> gnu: vulkan-tools: Update to 1.3.280.0.
> gnu: magic-enum: Update to 0.9.5.
> gnu: Add vulkan-utility-libraries.
> gnu: vulkan-validationlayers: Update to 1.3.280.0.
> gnu: Add directx-shader-compiler.
>
> gnu/local.mk | 1 -
> gnu/packages/cpp.scm | 5 +-
> .../patches/glslang-install-static-libs.patch | 61 ----
> gnu/packages/vulkan.scm | 262 ++++++++++++------
> 4 files changed, 181 insertions(+), 148 deletions(-)
> delete mode 100644 gnu/packages/patches/glslang-install-static-libs.patch
>
>
> base-commit: a223b1e52ba1db89b11a670915e8c9af3c3ac4af

Done starting with ded6c9a692a9a4f5b21e7db9b75c967736bc2b34 in
mesa-updates and in master with
2d5736cc3e869fadd2592cc13a8d332fac63b144.

Except for the last patch, as that can be done separately so I hadn't
looked at it.

I think, since nothing else is using directx-headers, that can just be a
bare origin input (e.g. an input where it is just that origin source)
and used like that. Some minor stylistic stuff (synopsis can be shorter,
change "used to compile" to just "for", double spaces in description,
maybe long lines? didn't check yet) but otherwise I think is fine.

Thanks for the great work on the vulkan updates!

John
D
[PATCH] gnu: Add directx-shader-compiler.
(address . 69461@debbugs.gnu.org)
28e69dd9147a8e24ece2216f46bb15201b2b0a6a.1720365035.git.i@dan.games
* gnu/packages/vulkan.scm (directx-headers-for-dxc): New variable.

Change-Id: I6e81f59ebd7122c007cce2df820359c055df5fd9
---
gnu/packages/vulkan.scm | 65 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 65 insertions(+)

Toggle diff (85 lines)
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index 25542c1e06..61d49c7b2b 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -44,7 +44,9 @@ (define-module (gnu packages vulkan)
#:use-module (gnu packages llvm)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
+ #:use-module (gnu packages version-control)
#:use-module (gnu packages wine)
+ #:use-module (gnu packages xml)
#:use-module (gnu packages xorg))
(define-public spirv-headers
@@ -642,3 +644,66 @@ (define-public vulkan-utility-libraries
(synopsis "Utility libraries for Vulkan developers")
(description "Utility libraries for Vulkan developers.")
(license license:asl2.0)))
+
+;; directx-shader-compiler depends on an old version of directx-headers.
+(define directx-headers-for-dxc
+ (let ((commit "980971e835876dc0cde415e8f9bc646e64667bf7")
+ (revision "115"))
+ (origin
+ (method git-fetch)
+ (uri (git-reference (url
+ "https://github.com/microsoft/DirectX-Headers.git")
+ (commit commit)))
+ (file-name (git-file-name "directx-headers-for-dxc"
+ (git-version "0" revision commit)))
+ (sha256 (base32 "0c7l2xdsbr132ga2nyqjhz9xa42dxvhh9idjxnl673mz5kab1j6h")))))
+
+(define-public directx-shader-compiler
+ (package
+ (name "directx-shader-compiler")
+ (version "1.8.2405")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/microsoft/DirectXShaderCompiler.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "19rc3nb32ic0bz2vc3nbpb5lw3dh63vnpf2jvdk131m6j7kwbi4k"))
+ (modules '((guix build utils)))
+ (snippet '(substitute* "CMakeLists.txt"
+ (("add_subdirectory\\(external\\)")
+ "find_package(SPIRV-Tools REQUIRED)
+find_package(SPIRV-Tools-opt CONFIG REQUIRED)")))))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:configure-flags #~(list "-G"
+ "Unix Makefiles"
+ "-C"
+ "../source/cmake/caches/PredefinedParams.cmake"
+ (string-append "-DSPIRV_HEADER_INCLUDE_DIR="
+ #$(this-package-input
+ "spirv-headers") "/include")
+ (string-append "-DSPIRV_TOOLS_INCLUDE_DIR="
+ #$(this-package-input
+ "spirv-tools") "/include")
+ (string-append "-DDIRECTX_HEADER_INCLUDE_DIR="
+ #$directx-headers-for-dxc
+ "/include"))
+ #:phases #~(modify-phases %standard-phases
+ (replace 'install
+ (lambda* (#:key make-flags outputs #:allow-other-keys)
+ (apply invoke "make" "install-distribution"
+ make-flags))))))
+ (inputs (list libxml2 spirv-headers spirv-tools))
+ (native-inputs (list git python))
+ (home-page "https://github.com/microsoft/DirectXShaderCompiler")
+ (synopsis
+ "@acronym{HLSL, High-Level Shader Language} shader compiler")
+ (description
+ "The DirectX Shader Compiler project includes a compiler and related
+tools for compiling @acronym{HLSL, High-Level Shader Language} programs into
+SPIR-V.")
+ (license license:ncsa)))

base-commit: c86a07bacc2469e7a00fbc66cfe4f322e4bafb06
--
2.41.0
?
Your comment

Commenting via the web interface is currently disabled.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 69461
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