* [bug#63219] [PATCH mesa-branch 1/4] gnu: mesa: Fix library paths in Vulkan layer manifests.
2023-05-02 0:59 [bug#63219] [PATCH mesa-branch 0/4] Mesa update plus various fixes and cleanups Kaelyn Takata via Guix-patches via
@ 2023-05-02 1:01 ` Kaelyn Takata via Guix-patches via
2023-05-02 1:02 ` [bug#63219] [PATCH mesa-branch 2/4] gnu: mesa: Use gexps instead of quasiquote Kaelyn Takata via Guix-patches via
` (5 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: Kaelyn Takata via Guix-patches via @ 2023-05-02 1:01 UTC (permalink / raw)
To: 63219; +Cc: Kaelyn Takata
* gnu/packages/gl.scm (mesa): Fix library paths in Vulkan layer manifests.
---
gnu/packages/gl.scm | 24 +++++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index 3a63d70c7a..6521170ebb 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -17,6 +17,7 @@
;;; Copyright © 2021 Ivan Gankevich <i.gankevich@spbu.ru>
;;; Copyright © 2021, 2022 John Kehayias <john.kehayias@protonmail.com>
;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com>
+;;; Copyright © 2023 Kaelyn Takata <kaelyn.alexi@protonmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -488,7 +489,28 @@ (define-public mesa
file)
(symlink reference file)))
others))))
- (delete-duplicates inodes))))))))
+ (delete-duplicates inodes)))))
+ (add-after 'install 'set-layer-path-in-manifests
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (implicit-path (string-append
+ out
+ "/share/vulkan/implicit_layer.d/"))
+ (explicit-path (string-append
+ out
+ "/share/vulkan/explicit_layer.d/"))
+ (fix-layer-path
+ (lambda (layer-name)
+ (let* ((explicit (string-append explicit-path layer-name ".json"))
+ (implicit (string-append implicit-path layer-name ".json"))
+ (manifest (if (file-exists? explicit)
+ explicit
+ implicit)))
+ (substitute* manifest
+ (((string-append "\"lib" layer-name ".so\""))
+ (string-append "\"" out "/lib/lib" layer-name ".so\"")))))))
+ (for-each fix-layer-path '("VkLayer_MESA_device_select"
+ "VkLayer_MESA_overlay"))))))))
(home-page "https://mesa3d.org/")
(synopsis "OpenGL and Vulkan implementations")
(description "Mesa is a free implementation of the OpenGL and Vulkan
--
2.39.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [bug#63219] [PATCH mesa-branch 2/4] gnu: mesa: Use gexps instead of quasiquote.
2023-05-02 0:59 [bug#63219] [PATCH mesa-branch 0/4] Mesa update plus various fixes and cleanups Kaelyn Takata via Guix-patches via
2023-05-02 1:01 ` [bug#63219] [PATCH mesa-branch 1/4] gnu: mesa: Fix library paths in Vulkan layer manifests Kaelyn Takata via Guix-patches via
@ 2023-05-02 1:02 ` Kaelyn Takata via Guix-patches via
2023-05-02 1:02 ` [bug#63219] [PATCH mesa-branch 3/4] gnu: mesa: Fix hardware video decoding Kaelyn Takata via Guix-patches via
` (4 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: Kaelyn Takata via Guix-patches via @ 2023-05-02 1:02 UTC (permalink / raw)
To: 63219; +Cc: Kaelyn Takata
* gnu/packages/gl.scm (mesa)[arguments]: Use gexps instead of quasiquote.
---
gnu/packages/gl.scm | 38 ++++++++++++++++++++------------------
1 file changed, 20 insertions(+), 18 deletions(-)
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index 6521170ebb..3d6d1e2ab5 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -315,8 +315,10 @@ (define-public mesa
(@ (gnu packages base) which)))
(outputs '("out" "bin"))
(arguments
- `(#:configure-flags
- '(,@(match (%current-system)
+ (list
+ #:configure-flags
+ #~(list
+ #$@(match (%current-system)
("aarch64-linux"
;; TODO: Fix svga driver for non-Intel architectures.
'("-Dgallium-drivers=etnaviv,freedreno,kmsro,lima,nouveau,\
@@ -345,7 +347,7 @@ (define-public mesa
"-Dshared-glapi=enabled"
;; Explicitly enable Vulkan on some architectures.
- ,@(match (%current-system)
+ #$@(match (%current-system)
((or "i686-linux" "x86_64-linux")
'("-Dvulkan-drivers=intel,amd"))
((or "powerpc64le-linux" "powerpc-linux")
@@ -369,12 +371,12 @@ (define-public mesa
;; documentation recommends using 'release' for performance anyway.
#:build-type "release"
- #:modules ((ice-9 match)
- (srfi srfi-1)
- (guix build utils)
- (guix build meson-build-system))
+ #:modules '((ice-9 match)
+ (srfi srfi-1)
+ (guix build utils)
+ (guix build meson-build-system))
#:phases
- (modify-phases %standard-phases
+ #~(modify-phases %standard-phases
(add-after 'unpack 'disable-failing-test
(lambda _
;; Disable the intel vulkan (anv_state_pool) tests, as they may
@@ -383,7 +385,7 @@ (define-public mesa
(substitute* "src/intel/vulkan/meson.build"
(("if with_tests")
"if false"))
- ,@(match (%current-system)
+ #$@(match (%current-system)
("riscv64-linux"
;; According to the test logs the llvm JIT is not designed
;; for this architecture and the llvmpipe tests all segfault.
@@ -428,8 +430,8 @@ (define-public mesa
(_
'((display "No tests to disable on this architecture.\n"))))))
(add-before 'configure 'fix-dlopen-libnames
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
+ (lambda _
+ (let ((out #$output))
;; Remain agnostic to .so.X.Y.Z versions while doing
;; the substitutions so we're future-safe.
(substitute* "src/glx/meson.build"
@@ -446,9 +448,9 @@ (define-public mesa
(("\"gbm_dri\\.so")
(string-append "\"" out "/lib/dri/gbm_dri.so"))))))
(add-after 'install 'split-outputs
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out"))
- (bin (assoc-ref outputs "bin")))
+ (lambda _
+ (let ((out #$output)
+ (bin #$output:bin))
;; Not all architectures have the Vulkan overlay control script.
(mkdir-p (string-append out "/bin"))
(call-with-output-file (string-append out "/bin/.empty")
@@ -457,13 +459,13 @@ (define-public mesa
(string-append bin "/bin"))
(delete-file-recursively (string-append out "/bin")))))
(add-after 'install 'symlinks-instead-of-hard-links
- (lambda* (#:key outputs #:allow-other-keys)
+ (lambda _
;; All the drivers and gallium targets create hard links upon
;; installation (search for "hardlink each megadriver instance"
;; in the makefiles). This is no good for us since we'd produce
;; nars that contain several copies of these files. Thus, turn
;; them into symlinks, which saves ~124 MiB.
- (let* ((out (assoc-ref outputs "out"))
+ (let* ((out #$output)
(lib (string-append out "/lib"))
(files (find-files lib
(lambda (file stat)
@@ -491,8 +493,8 @@ (define-public mesa
others))))
(delete-duplicates inodes)))))
(add-after 'install 'set-layer-path-in-manifests
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
+ (lambda _
+ (let* ((out #$output)
(implicit-path (string-append
out
"/share/vulkan/implicit_layer.d/"))
--
2.39.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [bug#63219] [PATCH mesa-branch 3/4] gnu: mesa: Fix hardware video decoding.
2023-05-02 0:59 [bug#63219] [PATCH mesa-branch 0/4] Mesa update plus various fixes and cleanups Kaelyn Takata via Guix-patches via
2023-05-02 1:01 ` [bug#63219] [PATCH mesa-branch 1/4] gnu: mesa: Fix library paths in Vulkan layer manifests Kaelyn Takata via Guix-patches via
2023-05-02 1:02 ` [bug#63219] [PATCH mesa-branch 2/4] gnu: mesa: Use gexps instead of quasiquote Kaelyn Takata via Guix-patches via
@ 2023-05-02 1:02 ` Kaelyn Takata via Guix-patches via
2023-05-02 1:02 ` [bug#63219] [PATCH mesa-branch 4/4] gnu: mesa: Update to 23.0.3 Kaelyn Takata via Guix-patches via
` (3 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: Kaelyn Takata via Guix-patches via @ 2023-05-02 1:02 UTC (permalink / raw)
To: 63219; +Cc: Kaelyn Takata
* gnu/packages/gl.scm (mesa): Fix hardware video decoding.
[arguments]: Add -Dvideo-codecs to the #:configure-flags
[native-search-paths]: Add VDPAU_DRIVER_PATH so libvdpau can find the drivers.
---
gnu/packages/gl.scm | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index 3d6d1e2ab5..09a1df4936 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -362,6 +362,10 @@ (define-public mesa
;; Enable the Vulkan overlay layer on all architectures.
"-Dvulkan-layers=device-select,overlay"
+ ;; Enable the codecs that were built by default as part of the
+ ;; 21.3.x releases to avoid functionality regressions.
+ "-Dvideo-codecs=vc1dec,h264dec,h264enc,h265dec,h265enc"
+
;; Also enable the tests.
"-Dbuild-tests=true"
@@ -513,6 +517,11 @@ (define-public mesa
(string-append "\"" out "/lib/lib" layer-name ".so\"")))))))
(for-each fix-layer-path '("VkLayer_MESA_device_select"
"VkLayer_MESA_overlay"))))))))
+ (native-search-paths
+ (list (search-path-specification
+ ;; Ensure the Mesa VDPAU drivers can be found.
+ (variable "VDPAU_DRIVER_PATH")
+ (files '("lib/vdpau")))))
(home-page "https://mesa3d.org/")
(synopsis "OpenGL and Vulkan implementations")
(description "Mesa is a free implementation of the OpenGL and Vulkan
--
2.39.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [bug#63219] [PATCH mesa-branch 4/4] gnu: mesa: Update to 23.0.3.
2023-05-02 0:59 [bug#63219] [PATCH mesa-branch 0/4] Mesa update plus various fixes and cleanups Kaelyn Takata via Guix-patches via
` (2 preceding siblings ...)
2023-05-02 1:02 ` [bug#63219] [PATCH mesa-branch 3/4] gnu: mesa: Fix hardware video decoding Kaelyn Takata via Guix-patches via
@ 2023-05-02 1:02 ` Kaelyn Takata via Guix-patches via
2023-05-02 4:44 ` [bug#63219] [PATCH mesa-branch v2 2/4] gnu: mesa: Use gexps instead of quasiquote Kaelyn Takata via Guix-patches via
` (2 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: Kaelyn Takata via Guix-patches via @ 2023-05-02 1:02 UTC (permalink / raw)
To: 63219; +Cc: Kaelyn Takata
* gnu/packages/gl.scm (mesa): Update to 23.0.3.
[source]: Remove obsolete patch and update HTTPS url.
[arguments]: Enable the crocus gallium driver.
* gnu/packages/patches/mesa-fix-sporadic-test-failures.patch: Delete file.
* gnu/local.mk (dist_patch_DATA): Remove it.
---
gnu/local.mk | 1 -
gnu/packages/gl.scm | 14 ++++------
.../mesa-fix-sporadic-test-failures.patch | 27 -------------------
3 files changed, 5 insertions(+), 37 deletions(-)
delete mode 100644 gnu/packages/patches/mesa-fix-sporadic-test-failures.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 4976b5c740..cb260e4ece 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1558,7 +1558,6 @@ dist_patch_DATA = \
%D%/packages/patches/mercurial-hg-extension-path.patch \
%D%/packages/patches/mercurial-openssl-compat.patch \
%D%/packages/patches/mesa-opencl-all-targets.patch \
- %D%/packages/patches/mesa-fix-sporadic-test-failures.patch \
%D%/packages/patches/mhash-keygen-test-segfault.patch \
%D%/packages/patches/mia-fix-boost-headers.patch \
%D%/packages/patches/mia-vtk9.patch \
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index 09a1df4936..e93f21c374 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -267,21 +267,17 @@ (define libva-without-mesa
(define-public mesa
(package
(name "mesa")
- (version "22.2.4")
+ (version "23.0.3")
(source
(origin
(method url-fetch)
- (uri (list (string-append "https://mesa.freedesktop.org/archive/"
+ (uri (list (string-append "https://archive.mesa3d.org/"
"mesa-" version ".tar.xz")
(string-append "ftp://ftp.freedesktop.org/pub/mesa/"
- "mesa-" version ".tar.xz")
- (string-append "ftp://ftp.freedesktop.org/pub/mesa/"
- version "/mesa-" version ".tar.xz")))
+ "mesa-" version ".tar.xz")))
(sha256
(base32
- "1azpr68pdg63yq3igmzwsgn2ypg49m0mp3hfkq0lcyswr99npmv5"))
- (patches
- (list (search-patch "mesa-fix-sporadic-test-failures.patch")))))
+ "1mcjf41x2bhxs6yxars7nh2vfryfw50g6rvbcfbb1wqdv2jn4qrq"))))
(build-system meson-build-system)
(propagated-inputs
;; The following are in the Requires.private field of gl.pc.
@@ -330,7 +326,7 @@ (define-public mesa
((or "powerpc64le-linux" "powerpc-linux" "riscv64-linux")
'("-Dgallium-drivers=nouveau,r300,r600,radeonsi,swrast,virgl"))
(_
- '("-Dgallium-drivers=iris,nouveau,r300,r600,radeonsi,\
+ '("-Dgallium-drivers=crocus,iris,nouveau,r300,r600,radeonsi,\
svga,swrast,virgl")))
;; Enable various optional features. TODO: opencl requires libclc,
;; omx requires libomxil-bellagio
diff --git a/gnu/packages/patches/mesa-fix-sporadic-test-failures.patch b/gnu/packages/patches/mesa-fix-sporadic-test-failures.patch
deleted file mode 100644
index 50ac5530a2..0000000000
--- a/gnu/packages/patches/mesa-fix-sporadic-test-failures.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-commit 7749599d737d205a88bbb6fa755ba095d9b581fa
-Author: Gert Wollny <gert.wollny@collabora.com>
-Date: Mon Aug 15 17:15:43 2022 +0200
-
- r600/sfn: Initialize out buffer when printing op
-
- 79ca456b4837b3bc21cf9ef3c03c505c4b4909f6
- r600/sfn: rewrite NIR backend
-
- Closes: #7021
-
- Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
- Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18130>
-
-diff --git a/src/gallium/drivers/r600/sfn/sfn_instr_export.cpp b/src/gallium/drivers/r600/sfn/sfn_instr_export.cpp
-index 3d40ea1796a..00826ed6457 100644
---- a/src/gallium/drivers/r600/sfn/sfn_instr_export.cpp
-+++ b/src/gallium/drivers/r600/sfn/sfn_instr_export.cpp
-@@ -206,7 +206,7 @@ bool WriteScratchInstr::do_ready() const
-
- void WriteScratchInstr::do_print(std::ostream& os) const
- {
-- char buf[6];
-+ char buf[6] = {0};
-
- os << "WRITE_SCRATCH ";
- if (m_address)
--
2.39.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [bug#63219] [PATCH mesa-branch v2 2/4] gnu: mesa: Use gexps instead of quasiquote.
2023-05-02 0:59 [bug#63219] [PATCH mesa-branch 0/4] Mesa update plus various fixes and cleanups Kaelyn Takata via Guix-patches via
` (3 preceding siblings ...)
2023-05-02 1:02 ` [bug#63219] [PATCH mesa-branch 4/4] gnu: mesa: Update to 23.0.3 Kaelyn Takata via Guix-patches via
@ 2023-05-02 4:44 ` Kaelyn Takata via Guix-patches via
2023-05-04 20:12 ` [bug#63219] [PATCH mesa-branch v3 0/4] Mesa update plus various fixes and cleanups Kaelyn Takata via Guix-patches via
2023-05-05 6:34 ` [bug#63219] [PATCH mesa-branch 0/4] Mesa update plus various fixes and cleanups Brendan Tildesley
6 siblings, 0 replies; 14+ messages in thread
From: Kaelyn Takata via Guix-patches via @ 2023-05-02 4:44 UTC (permalink / raw)
To: 63219; +Cc: Kaelyn Takata
* gnu/packages/gl.scm (mesa)[arguments]: Use gexps instead of quasiquote.
---
gnu/packages/gl.scm | 48 +++++++++++++++++++++++----------------------
1 file changed, 25 insertions(+), 23 deletions(-)
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index 6521170ebb..f705b864f1 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -315,8 +315,10 @@ (define-public mesa
(@ (gnu packages base) which)))
(outputs '("out" "bin"))
(arguments
- `(#:configure-flags
- '(,@(match (%current-system)
+ (list
+ #:configure-flags
+ #~(list
+ #$@(match (%current-system)
("aarch64-linux"
;; TODO: Fix svga driver for non-Intel architectures.
'("-Dgallium-drivers=etnaviv,freedreno,kmsro,lima,nouveau,\
@@ -345,7 +347,7 @@ (define-public mesa
"-Dshared-glapi=enabled"
;; Explicitly enable Vulkan on some architectures.
- ,@(match (%current-system)
+ #$@(match (%current-system)
((or "i686-linux" "x86_64-linux")
'("-Dvulkan-drivers=intel,amd"))
((or "powerpc64le-linux" "powerpc-linux")
@@ -369,12 +371,12 @@ (define-public mesa
;; documentation recommends using 'release' for performance anyway.
#:build-type "release"
- #:modules ((ice-9 match)
- (srfi srfi-1)
- (guix build utils)
- (guix build meson-build-system))
+ #:modules '((ice-9 match)
+ (srfi srfi-1)
+ (guix build utils)
+ (guix build meson-build-system))
#:phases
- (modify-phases %standard-phases
+ #~(modify-phases %standard-phases
(add-after 'unpack 'disable-failing-test
(lambda _
;; Disable the intel vulkan (anv_state_pool) tests, as they may
@@ -383,7 +385,7 @@ (define-public mesa
(substitute* "src/intel/vulkan/meson.build"
(("if with_tests")
"if false"))
- ,@(match (%current-system)
+ #$@(match (%current-system)
("riscv64-linux"
;; According to the test logs the llvm JIT is not designed
;; for this architecture and the llvmpipe tests all segfault.
@@ -428,8 +430,8 @@ (define-public mesa
(_
'((display "No tests to disable on this architecture.\n"))))))
(add-before 'configure 'fix-dlopen-libnames
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
+ (lambda _
+ (let ((out #$output))
;; Remain agnostic to .so.X.Y.Z versions while doing
;; the substitutions so we're future-safe.
(substitute* "src/glx/meson.build"
@@ -446,9 +448,9 @@ (define-public mesa
(("\"gbm_dri\\.so")
(string-append "\"" out "/lib/dri/gbm_dri.so"))))))
(add-after 'install 'split-outputs
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out"))
- (bin (assoc-ref outputs "bin")))
+ (lambda _
+ (let ((out #$output)
+ (bin #$output:bin))
;; Not all architectures have the Vulkan overlay control script.
(mkdir-p (string-append out "/bin"))
(call-with-output-file (string-append out "/bin/.empty")
@@ -457,13 +459,13 @@ (define-public mesa
(string-append bin "/bin"))
(delete-file-recursively (string-append out "/bin")))))
(add-after 'install 'symlinks-instead-of-hard-links
- (lambda* (#:key outputs #:allow-other-keys)
+ (lambda _
;; All the drivers and gallium targets create hard links upon
;; installation (search for "hardlink each megadriver instance"
;; in the makefiles). This is no good for us since we'd produce
;; nars that contain several copies of these files. Thus, turn
;; them into symlinks, which saves ~124 MiB.
- (let* ((out (assoc-ref outputs "out"))
+ (let* ((out #$output)
(lib (string-append out "/lib"))
(files (find-files lib
(lambda (file stat)
@@ -491,8 +493,8 @@ (define-public mesa
others))))
(delete-duplicates inodes)))))
(add-after 'install 'set-layer-path-in-manifests
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
+ (lambda _
+ (let* ((out #$output)
(implicit-path (string-append
out
"/share/vulkan/implicit_layer.d/"))
@@ -529,7 +531,7 @@ (define-public mesa-opencl
(arguments
(substitute-keyword-arguments (package-arguments mesa)
((#:configure-flags flags)
- `(cons "-Dgallium-opencl=standalone" ,flags))))
+ #~(cons "-Dgallium-opencl=standalone" #$flags))))
(inputs
(modify-inputs (package-inputs mesa)
(prepend libclc)))
@@ -543,10 +545,10 @@ (define-public mesa-opencl-icd
(arguments
(substitute-keyword-arguments (package-arguments mesa)
((#:configure-flags flags)
- `(cons "-Dgallium-opencl=icd"
- ,(delete "-Dgallium-opencl=standalone" flags)))
+ #~(cons "-Dgallium-opencl=icd"
+ (delete "-Dgallium-opencl=standalone" #$flags)))
((#:phases phases)
- `(modify-phases ,phases
+ #~(modify-phases #$phases
(add-after 'install 'mesa-icd-absolute-path
(lambda _
;; Use absolute path for OpenCL platform library.
@@ -554,7 +556,7 @@ (define-public mesa-opencl-icd
;; for ICD in our applications to find OpenCL platform.
(use-modules (guix build utils)
(ice-9 textual-ports))
- (let* ((out (assoc-ref %outputs "out"))
+ (let* ((out #$output)
(mesa-icd (string-append out "/etc/OpenCL/vendors/mesa.icd"))
(old-path (call-with-input-file mesa-icd get-string-all))
(new-path (string-append out "/lib/" (string-trim-both old-path))))
--
2.39.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [bug#63219] [PATCH mesa-branch v3 0/4] Mesa update plus various fixes and cleanups.
2023-05-02 0:59 [bug#63219] [PATCH mesa-branch 0/4] Mesa update plus various fixes and cleanups Kaelyn Takata via Guix-patches via
` (4 preceding siblings ...)
2023-05-02 4:44 ` [bug#63219] [PATCH mesa-branch v2 2/4] gnu: mesa: Use gexps instead of quasiquote Kaelyn Takata via Guix-patches via
@ 2023-05-04 20:12 ` Kaelyn Takata via Guix-patches via
2023-05-04 20:12 ` [bug#63219] [PATCH mesa-branch v3 1/4] gnu: mesa: Fix library paths in Vulkan layer manifests Kaelyn Takata via Guix-patches via
` (3 more replies)
2023-05-05 6:34 ` [bug#63219] [PATCH mesa-branch 0/4] Mesa update plus various fixes and cleanups Brendan Tildesley
6 siblings, 4 replies; 14+ messages in thread
From: Kaelyn Takata via Guix-patches via @ 2023-05-04 20:12 UTC (permalink / raw)
To: 63219; +Cc: Kaelyn Takata
v2:
* updated gexp patch to also use gexps in the packages inheriting from mesa.
v3:
* rebased and properly re-sent.
Kaelyn Takata (4):
gnu: mesa: Fix library paths in Vulkan layer manifests.
gnu: mesa: Use gexps instead of quasiquote.
gnu: mesa: Fix hardware video decoding.
gnu: mesa: Update to 23.0.3.
gnu/local.mk | 1 -
gnu/packages/gl.scm | 91 ++++++++++++-------
.../mesa-fix-sporadic-test-failures.patch | 27 ------
3 files changed, 60 insertions(+), 59 deletions(-)
delete mode 100644 gnu/packages/patches/mesa-fix-sporadic-test-failures.patch
base-commit: 0584f5b48987c058e2dd694c2bc886b7aa40e15d
--
2.39.2
^ permalink raw reply [flat|nested] 14+ messages in thread
* [bug#63219] [PATCH mesa-branch v3 1/4] gnu: mesa: Fix library paths in Vulkan layer manifests.
2023-05-04 20:12 ` [bug#63219] [PATCH mesa-branch v3 0/4] Mesa update plus various fixes and cleanups Kaelyn Takata via Guix-patches via
@ 2023-05-04 20:12 ` Kaelyn Takata via Guix-patches via
2023-05-04 20:12 ` [bug#63219] [PATCH mesa-branch v3 2/4] gnu: mesa: Use gexps instead of quasiquote Kaelyn Takata via Guix-patches via
` (2 subsequent siblings)
3 siblings, 0 replies; 14+ messages in thread
From: Kaelyn Takata via Guix-patches via @ 2023-05-04 20:12 UTC (permalink / raw)
To: 63219; +Cc: Kaelyn Takata
* gnu/packages/gl.scm (mesa): Fix library paths in Vulkan layer manifests.
---
gnu/packages/gl.scm | 24 +++++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index 3a63d70c7a..6521170ebb 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -17,6 +17,7 @@
;;; Copyright © 2021 Ivan Gankevich <i.gankevich@spbu.ru>
;;; Copyright © 2021, 2022 John Kehayias <john.kehayias@protonmail.com>
;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com>
+;;; Copyright © 2023 Kaelyn Takata <kaelyn.alexi@protonmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -488,7 +489,28 @@ (define-public mesa
file)
(symlink reference file)))
others))))
- (delete-duplicates inodes))))))))
+ (delete-duplicates inodes)))))
+ (add-after 'install 'set-layer-path-in-manifests
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (implicit-path (string-append
+ out
+ "/share/vulkan/implicit_layer.d/"))
+ (explicit-path (string-append
+ out
+ "/share/vulkan/explicit_layer.d/"))
+ (fix-layer-path
+ (lambda (layer-name)
+ (let* ((explicit (string-append explicit-path layer-name ".json"))
+ (implicit (string-append implicit-path layer-name ".json"))
+ (manifest (if (file-exists? explicit)
+ explicit
+ implicit)))
+ (substitute* manifest
+ (((string-append "\"lib" layer-name ".so\""))
+ (string-append "\"" out "/lib/lib" layer-name ".so\"")))))))
+ (for-each fix-layer-path '("VkLayer_MESA_device_select"
+ "VkLayer_MESA_overlay"))))))))
(home-page "https://mesa3d.org/")
(synopsis "OpenGL and Vulkan implementations")
(description "Mesa is a free implementation of the OpenGL and Vulkan
--
2.39.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [bug#63219] [PATCH mesa-branch v3 2/4] gnu: mesa: Use gexps instead of quasiquote.
2023-05-04 20:12 ` [bug#63219] [PATCH mesa-branch v3 0/4] Mesa update plus various fixes and cleanups Kaelyn Takata via Guix-patches via
2023-05-04 20:12 ` [bug#63219] [PATCH mesa-branch v3 1/4] gnu: mesa: Fix library paths in Vulkan layer manifests Kaelyn Takata via Guix-patches via
@ 2023-05-04 20:12 ` Kaelyn Takata via Guix-patches via
2023-05-04 20:12 ` [bug#63219] [PATCH mesa-branch v3 3/4] gnu: mesa: Fix hardware video decoding Kaelyn Takata via Guix-patches via
2023-05-04 20:12 ` [bug#63219] [PATCH mesa-branch v3 4/4] gnu: mesa: Update to 23.0.3 Kaelyn Takata via Guix-patches via
3 siblings, 0 replies; 14+ messages in thread
From: Kaelyn Takata via Guix-patches via @ 2023-05-04 20:12 UTC (permalink / raw)
To: 63219; +Cc: Kaelyn Takata
* gnu/packages/gl.scm (mesa)[arguments]: Use gexps instead of quasiquote.
---
gnu/packages/gl.scm | 48 +++++++++++++++++++++++----------------------
1 file changed, 25 insertions(+), 23 deletions(-)
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index 6521170ebb..f705b864f1 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -315,8 +315,10 @@ (define-public mesa
(@ (gnu packages base) which)))
(outputs '("out" "bin"))
(arguments
- `(#:configure-flags
- '(,@(match (%current-system)
+ (list
+ #:configure-flags
+ #~(list
+ #$@(match (%current-system)
("aarch64-linux"
;; TODO: Fix svga driver for non-Intel architectures.
'("-Dgallium-drivers=etnaviv,freedreno,kmsro,lima,nouveau,\
@@ -345,7 +347,7 @@ (define-public mesa
"-Dshared-glapi=enabled"
;; Explicitly enable Vulkan on some architectures.
- ,@(match (%current-system)
+ #$@(match (%current-system)
((or "i686-linux" "x86_64-linux")
'("-Dvulkan-drivers=intel,amd"))
((or "powerpc64le-linux" "powerpc-linux")
@@ -369,12 +371,12 @@ (define-public mesa
;; documentation recommends using 'release' for performance anyway.
#:build-type "release"
- #:modules ((ice-9 match)
- (srfi srfi-1)
- (guix build utils)
- (guix build meson-build-system))
+ #:modules '((ice-9 match)
+ (srfi srfi-1)
+ (guix build utils)
+ (guix build meson-build-system))
#:phases
- (modify-phases %standard-phases
+ #~(modify-phases %standard-phases
(add-after 'unpack 'disable-failing-test
(lambda _
;; Disable the intel vulkan (anv_state_pool) tests, as they may
@@ -383,7 +385,7 @@ (define-public mesa
(substitute* "src/intel/vulkan/meson.build"
(("if with_tests")
"if false"))
- ,@(match (%current-system)
+ #$@(match (%current-system)
("riscv64-linux"
;; According to the test logs the llvm JIT is not designed
;; for this architecture and the llvmpipe tests all segfault.
@@ -428,8 +430,8 @@ (define-public mesa
(_
'((display "No tests to disable on this architecture.\n"))))))
(add-before 'configure 'fix-dlopen-libnames
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
+ (lambda _
+ (let ((out #$output))
;; Remain agnostic to .so.X.Y.Z versions while doing
;; the substitutions so we're future-safe.
(substitute* "src/glx/meson.build"
@@ -446,9 +448,9 @@ (define-public mesa
(("\"gbm_dri\\.so")
(string-append "\"" out "/lib/dri/gbm_dri.so"))))))
(add-after 'install 'split-outputs
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out"))
- (bin (assoc-ref outputs "bin")))
+ (lambda _
+ (let ((out #$output)
+ (bin #$output:bin))
;; Not all architectures have the Vulkan overlay control script.
(mkdir-p (string-append out "/bin"))
(call-with-output-file (string-append out "/bin/.empty")
@@ -457,13 +459,13 @@ (define-public mesa
(string-append bin "/bin"))
(delete-file-recursively (string-append out "/bin")))))
(add-after 'install 'symlinks-instead-of-hard-links
- (lambda* (#:key outputs #:allow-other-keys)
+ (lambda _
;; All the drivers and gallium targets create hard links upon
;; installation (search for "hardlink each megadriver instance"
;; in the makefiles). This is no good for us since we'd produce
;; nars that contain several copies of these files. Thus, turn
;; them into symlinks, which saves ~124 MiB.
- (let* ((out (assoc-ref outputs "out"))
+ (let* ((out #$output)
(lib (string-append out "/lib"))
(files (find-files lib
(lambda (file stat)
@@ -491,8 +493,8 @@ (define-public mesa
others))))
(delete-duplicates inodes)))))
(add-after 'install 'set-layer-path-in-manifests
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
+ (lambda _
+ (let* ((out #$output)
(implicit-path (string-append
out
"/share/vulkan/implicit_layer.d/"))
@@ -529,7 +531,7 @@ (define-public mesa-opencl
(arguments
(substitute-keyword-arguments (package-arguments mesa)
((#:configure-flags flags)
- `(cons "-Dgallium-opencl=standalone" ,flags))))
+ #~(cons "-Dgallium-opencl=standalone" #$flags))))
(inputs
(modify-inputs (package-inputs mesa)
(prepend libclc)))
@@ -543,10 +545,10 @@ (define-public mesa-opencl-icd
(arguments
(substitute-keyword-arguments (package-arguments mesa)
((#:configure-flags flags)
- `(cons "-Dgallium-opencl=icd"
- ,(delete "-Dgallium-opencl=standalone" flags)))
+ #~(cons "-Dgallium-opencl=icd"
+ (delete "-Dgallium-opencl=standalone" #$flags)))
((#:phases phases)
- `(modify-phases ,phases
+ #~(modify-phases #$phases
(add-after 'install 'mesa-icd-absolute-path
(lambda _
;; Use absolute path for OpenCL platform library.
@@ -554,7 +556,7 @@ (define-public mesa-opencl-icd
;; for ICD in our applications to find OpenCL platform.
(use-modules (guix build utils)
(ice-9 textual-ports))
- (let* ((out (assoc-ref %outputs "out"))
+ (let* ((out #$output)
(mesa-icd (string-append out "/etc/OpenCL/vendors/mesa.icd"))
(old-path (call-with-input-file mesa-icd get-string-all))
(new-path (string-append out "/lib/" (string-trim-both old-path))))
--
2.39.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [bug#63219] [PATCH mesa-branch v3 3/4] gnu: mesa: Fix hardware video decoding.
2023-05-04 20:12 ` [bug#63219] [PATCH mesa-branch v3 0/4] Mesa update plus various fixes and cleanups Kaelyn Takata via Guix-patches via
2023-05-04 20:12 ` [bug#63219] [PATCH mesa-branch v3 1/4] gnu: mesa: Fix library paths in Vulkan layer manifests Kaelyn Takata via Guix-patches via
2023-05-04 20:12 ` [bug#63219] [PATCH mesa-branch v3 2/4] gnu: mesa: Use gexps instead of quasiquote Kaelyn Takata via Guix-patches via
@ 2023-05-04 20:12 ` Kaelyn Takata via Guix-patches via
2023-05-04 20:12 ` [bug#63219] [PATCH mesa-branch v3 4/4] gnu: mesa: Update to 23.0.3 Kaelyn Takata via Guix-patches via
3 siblings, 0 replies; 14+ messages in thread
From: Kaelyn Takata via Guix-patches via @ 2023-05-04 20:12 UTC (permalink / raw)
To: 63219; +Cc: Kaelyn Takata
* gnu/packages/gl.scm (mesa): Fix hardware video decoding.
[arguments]: Add -Dvideo-codecs to the #:configure-flags
[native-search-paths]: Add VDPAU_DRIVER_PATH so libvdpau can find the drivers.
---
gnu/packages/gl.scm | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index f705b864f1..5248151a95 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -362,6 +362,10 @@ (define-public mesa
;; Enable the Vulkan overlay layer on all architectures.
"-Dvulkan-layers=device-select,overlay"
+ ;; Enable the codecs that were built by default as part of the
+ ;; 21.3.x releases to avoid functionality regressions.
+ "-Dvideo-codecs=vc1dec,h264dec,h264enc,h265dec,h265enc"
+
;; Also enable the tests.
"-Dbuild-tests=true"
@@ -513,6 +517,11 @@ (define-public mesa
(string-append "\"" out "/lib/lib" layer-name ".so\"")))))))
(for-each fix-layer-path '("VkLayer_MESA_device_select"
"VkLayer_MESA_overlay"))))))))
+ (native-search-paths
+ (list (search-path-specification
+ ;; Ensure the Mesa VDPAU drivers can be found.
+ (variable "VDPAU_DRIVER_PATH")
+ (files '("lib/vdpau")))))
(home-page "https://mesa3d.org/")
(synopsis "OpenGL and Vulkan implementations")
(description "Mesa is a free implementation of the OpenGL and Vulkan
--
2.39.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [bug#63219] [PATCH mesa-branch v3 4/4] gnu: mesa: Update to 23.0.3.
2023-05-04 20:12 ` [bug#63219] [PATCH mesa-branch v3 0/4] Mesa update plus various fixes and cleanups Kaelyn Takata via Guix-patches via
` (2 preceding siblings ...)
2023-05-04 20:12 ` [bug#63219] [PATCH mesa-branch v3 3/4] gnu: mesa: Fix hardware video decoding Kaelyn Takata via Guix-patches via
@ 2023-05-04 20:12 ` Kaelyn Takata via Guix-patches via
3 siblings, 0 replies; 14+ messages in thread
From: Kaelyn Takata via Guix-patches via @ 2023-05-04 20:12 UTC (permalink / raw)
To: 63219; +Cc: Kaelyn Takata
* gnu/packages/gl.scm (mesa): Update to 23.0.3.
[source]: Remove obsolete patch and update HTTPS url.
[arguments]: Enable the crocus gallium driver.
* gnu/packages/patches/mesa-fix-sporadic-test-failures.patch: Delete file.
* gnu/local.mk (dist_patch_DATA): Remove it.
---
gnu/local.mk | 1 -
gnu/packages/gl.scm | 14 ++++------
.../mesa-fix-sporadic-test-failures.patch | 27 -------------------
3 files changed, 5 insertions(+), 37 deletions(-)
delete mode 100644 gnu/packages/patches/mesa-fix-sporadic-test-failures.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 5f5de953d7..9a801f3f3e 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1559,7 +1559,6 @@ dist_patch_DATA = \
%D%/packages/patches/mercurial-hg-extension-path.patch \
%D%/packages/patches/mercurial-openssl-compat.patch \
%D%/packages/patches/mesa-opencl-all-targets.patch \
- %D%/packages/patches/mesa-fix-sporadic-test-failures.patch \
%D%/packages/patches/mhash-keygen-test-segfault.patch \
%D%/packages/patches/mia-fix-boost-headers.patch \
%D%/packages/patches/mia-vtk9.patch \
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index 5248151a95..235b386dad 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -267,21 +267,17 @@ (define libva-without-mesa
(define-public mesa
(package
(name "mesa")
- (version "22.2.4")
+ (version "23.0.3")
(source
(origin
(method url-fetch)
- (uri (list (string-append "https://mesa.freedesktop.org/archive/"
+ (uri (list (string-append "https://archive.mesa3d.org/"
"mesa-" version ".tar.xz")
(string-append "ftp://ftp.freedesktop.org/pub/mesa/"
- "mesa-" version ".tar.xz")
- (string-append "ftp://ftp.freedesktop.org/pub/mesa/"
- version "/mesa-" version ".tar.xz")))
+ "mesa-" version ".tar.xz")))
(sha256
(base32
- "1azpr68pdg63yq3igmzwsgn2ypg49m0mp3hfkq0lcyswr99npmv5"))
- (patches
- (list (search-patch "mesa-fix-sporadic-test-failures.patch")))))
+ "1mcjf41x2bhxs6yxars7nh2vfryfw50g6rvbcfbb1wqdv2jn4qrq"))))
(build-system meson-build-system)
(propagated-inputs
;; The following are in the Requires.private field of gl.pc.
@@ -330,7 +326,7 @@ (define-public mesa
((or "powerpc64le-linux" "powerpc-linux" "riscv64-linux")
'("-Dgallium-drivers=nouveau,r300,r600,radeonsi,swrast,virgl"))
(_
- '("-Dgallium-drivers=iris,nouveau,r300,r600,radeonsi,\
+ '("-Dgallium-drivers=crocus,iris,nouveau,r300,r600,radeonsi,\
svga,swrast,virgl")))
;; Enable various optional features. TODO: opencl requires libclc,
;; omx requires libomxil-bellagio
diff --git a/gnu/packages/patches/mesa-fix-sporadic-test-failures.patch b/gnu/packages/patches/mesa-fix-sporadic-test-failures.patch
deleted file mode 100644
index 50ac5530a2..0000000000
--- a/gnu/packages/patches/mesa-fix-sporadic-test-failures.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-commit 7749599d737d205a88bbb6fa755ba095d9b581fa
-Author: Gert Wollny <gert.wollny@collabora.com>
-Date: Mon Aug 15 17:15:43 2022 +0200
-
- r600/sfn: Initialize out buffer when printing op
-
- 79ca456b4837b3bc21cf9ef3c03c505c4b4909f6
- r600/sfn: rewrite NIR backend
-
- Closes: #7021
-
- Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
- Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18130>
-
-diff --git a/src/gallium/drivers/r600/sfn/sfn_instr_export.cpp b/src/gallium/drivers/r600/sfn/sfn_instr_export.cpp
-index 3d40ea1796a..00826ed6457 100644
---- a/src/gallium/drivers/r600/sfn/sfn_instr_export.cpp
-+++ b/src/gallium/drivers/r600/sfn/sfn_instr_export.cpp
-@@ -206,7 +206,7 @@ bool WriteScratchInstr::do_ready() const
-
- void WriteScratchInstr::do_print(std::ostream& os) const
- {
-- char buf[6];
-+ char buf[6] = {0};
-
- os << "WRITE_SCRATCH ";
- if (m_address)
--
2.39.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [bug#63219] [PATCH mesa-branch 0/4] Mesa update plus various fixes and cleanups.
2023-05-02 0:59 [bug#63219] [PATCH mesa-branch 0/4] Mesa update plus various fixes and cleanups Kaelyn Takata via Guix-patches via
` (5 preceding siblings ...)
2023-05-04 20:12 ` [bug#63219] [PATCH mesa-branch v3 0/4] Mesa update plus various fixes and cleanups Kaelyn Takata via Guix-patches via
@ 2023-05-05 6:34 ` Brendan Tildesley
2023-05-07 17:07 ` Maxim Cournoyer
6 siblings, 1 reply; 14+ messages in thread
From: Brendan Tildesley @ 2023-05-05 6:34 UTC (permalink / raw)
To: 63219; +Cc: Kaelyn Takata
You're a legend! The -Dvideo-codecs= line fixed an important regression
for me.
I think it would also be desirable to update libva and libva-utils along
with this patchset.
Also, mesa 23.1.0 will be out soon, although I think it's more important
to get this fix/update in
master asap to get things working for people.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [bug#63219] [PATCH mesa-branch 0/4] Mesa update plus various fixes and cleanups.
2023-05-05 6:34 ` [bug#63219] [PATCH mesa-branch 0/4] Mesa update plus various fixes and cleanups Brendan Tildesley
@ 2023-05-07 17:07 ` Maxim Cournoyer
2023-05-07 19:35 ` Kaelyn via Guix-patches via
0 siblings, 1 reply; 14+ messages in thread
From: Maxim Cournoyer @ 2023-05-07 17:07 UTC (permalink / raw)
To: Kaelyn Takata; +Cc: 63219, Brendan Tildesley
Hi,
Brendan Tildesley <mail@brendan.scot> writes:
> You're a legend! The -Dvideo-codecs= line fixed an important
> regression for me.
> I think it would also be desirable to update libva and libva-utils
> along with this patchset.
> Also, mesa 23.1.0 will be out soon, although I think it's more
> important to get this fix/update in
> master asap to get things working for people.
Pushed the mesa updates to master, along with the libva info updates;
thanks a lot to Kaelyn for working on this important update!
--
Thanks,
Maxim
^ permalink raw reply [flat|nested] 14+ messages in thread
* [bug#63219] [PATCH mesa-branch 0/4] Mesa update plus various fixes and cleanups.
2023-05-07 17:07 ` Maxim Cournoyer
@ 2023-05-07 19:35 ` Kaelyn via Guix-patches via
0 siblings, 0 replies; 14+ messages in thread
From: Kaelyn via Guix-patches via @ 2023-05-07 19:35 UTC (permalink / raw)
To: Maxim Cournoyer; +Cc: 63219, Brendan Tildesley
------- Original Message -------
On Sunday, May 7th, 2023 at 5:07 PM, Maxim Cournoyer <maxim.cournoyer@gmail.com> wrote:
>
> Hi,
>
> Brendan Tildesley mail@brendan.scot writes:
>
> > You're a legend! The -Dvideo-codecs= line fixed an important
> > regression for me.
> > I think it would also be desirable to update libva and libva-utils
> > along with this patchset.
> > Also, mesa 23.1.0 will be out soon, although I think it's more
> > important to get this fix/update in
> > master asap to get things working for people.
>
>
> Pushed the mesa updates to master, along with the libva info updates;
> thanks a lot to Kaelyn for working on this important update!
You're welcome! Thank you for pushing the mesa changes along with the libva updates!
Cheers,
Kaelyn
>
> --
> Thanks,
> Maxim
^ permalink raw reply [flat|nested] 14+ messages in thread