unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#58566] [PATCH core-updates] gnu: mesa: Update to 22.2.1.
@ 2022-10-16 16:51 Kaelyn Takata via Guix-patches via
  2022-10-19 15:32 ` [bug#58566] [PATCH core-updates v2 0/1] " Kaelyn Takata via Guix-patches via
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Kaelyn Takata via Guix-patches via @ 2022-10-16 16:51 UTC (permalink / raw)
  To: 58566; +Cc: Kaelyn Takata

* gnu/packages/gl.scm (mesa): Update to 22.1.7.
[phases]: Add phase to insert the full store path to the vulkan layer
shared libraries into the layer manifests so the vulkan loader can find
the layer shared libraries.
---
 gnu/packages/gl.scm | 27 ++++++++++++++++++++++++---
 1 file changed, 24 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index 7810d1d8ae..895c9c1b54 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -267,7 +267,7 @@ (define libva-without-mesa
 (define-public mesa
   (package
     (name "mesa")
-    (version "22.1.7")
+    (version "22.2.1")
     (source
      (origin
        (method url-fetch)
@@ -279,7 +279,7 @@ (define-public mesa
                                  version "/mesa-" version ".tar.xz")))
        (sha256
         (base32
-         "12ax6lmshc8aqzw5ca7ab7f7z64n9nyzci4r1s6y1l0iryr8x0ys"))))
+         "0g5ij57ljh3l04qf7qpildl45g5g7s8ycngc19z5xx1k1anbwy80"))))
     (build-system meson-build-system)
     (propagated-inputs
      ;; The following are in the Requires.private field of gl.pc.
@@ -488,7 +488,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.37.3





^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [bug#58566] [PATCH core-updates v2 0/1] gnu: mesa: Update to 22.2.1.
  2022-10-16 16:51 [bug#58566] [PATCH core-updates] gnu: mesa: Update to 22.2.1 Kaelyn Takata via Guix-patches via
@ 2022-10-19 15:32 ` Kaelyn Takata via Guix-patches via
  2022-10-19 15:32 ` [bug#58566] [PATCH core-updates v2 1/1] " Kaelyn Takata via Guix-patches via
  2022-11-21 19:16 ` [bug#58566] Mesa missing patches for Vulkan shared libraries Kaelyn via Guix-patches via
  2 siblings, 0 replies; 4+ messages in thread
From: Kaelyn Takata via Guix-patches via @ 2022-10-19 15:32 UTC (permalink / raw)
  To: 58566; +Cc: Kaelyn Takata

v2:
* Add copyright line
* Fix commit message
* Add fix for failing i686 test courtesy of John Kehayias (https://paste.debian.net/1257547/)

Kaelyn Takata (1):
  gnu: mesa: Update to 22.2.1.

 gnu/packages/gl.scm | 37 ++++++++++++++++++++++++++++++++++---
 1 file changed, 34 insertions(+), 3 deletions(-)

--
2.37.3






^ permalink raw reply	[flat|nested] 4+ messages in thread

* [bug#58566] [PATCH core-updates v2 1/1] gnu: mesa: Update to 22.2.1.
  2022-10-16 16:51 [bug#58566] [PATCH core-updates] gnu: mesa: Update to 22.2.1 Kaelyn Takata via Guix-patches via
  2022-10-19 15:32 ` [bug#58566] [PATCH core-updates v2 0/1] " Kaelyn Takata via Guix-patches via
@ 2022-10-19 15:32 ` Kaelyn Takata via Guix-patches via
  2022-11-21 19:16 ` [bug#58566] Mesa missing patches for Vulkan shared libraries Kaelyn via Guix-patches via
  2 siblings, 0 replies; 4+ messages in thread
From: Kaelyn Takata via Guix-patches via @ 2022-10-19 15:32 UTC (permalink / raw)
  To: 58566; +Cc: Kaelyn Takata

* gnu/packages/gl.scm (mesa): Update to 22.2.1.
[phases]{fix-instrfromstring-test}: New phase. Fix the instrfromstring
test which fails on i686 using the upstream change.
[phases]{set-layer-path-in-manifests}: New phase. Insert the full
store path to libVkLayer_MESA_overlay.so into the manifest
VkLayer_MESA_overlay.json so that the vulkan layer can be used without
special workarounds.
---
 gnu/packages/gl.scm | 37 ++++++++++++++++++++++++++++++++++---
 1 file changed, 34 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index 7810d1d8ae..b89510c476 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 © 2022 Kaelyn Takata <kaelyn.alexi@protonmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -267,7 +268,7 @@ (define libva-without-mesa
 (define-public mesa
   (package
     (name "mesa")
-    (version "22.1.7")
+    (version "22.2.1")
     (source
      (origin
        (method url-fetch)
@@ -279,7 +280,7 @@ (define-public mesa
                                  version "/mesa-" version ".tar.xz")))
        (sha256
         (base32
-         "12ax6lmshc8aqzw5ca7ab7f7z64n9nyzci4r1s6y1l0iryr8x0ys"))))
+         "0g5ij57ljh3l04qf7qpildl45g5g7s8ycngc19z5xx1k1anbwy80"))))
     (build-system meson-build-system)
     (propagated-inputs
      ;; The following are in the Requires.private field of gl.pc.
@@ -426,6 +427,15 @@ (define-public mesa
                       (("'lp_test_arit', ") ""))))
                  (_
                   '((display "No tests to disable on this architecture.\n"))))))
+         ,@(if (string=? (%current-system) "i686-linux")
+               '((add-after 'disable-failing-test 'fix-instrfromstring-test
+                   (lambda _
+                     ;; The instrfromstring test fails on i686, which has been already
+                     ;; fixed upstream but not in 22.2.1.
+                     ;; TODO: remove on update
+                     (substitute* "src/gallium/drivers/r600/sfn/sfn_instr_export.cpp"
+                       (("buf\\[6\\]") "buf[6] = {0}")))))
+               '())
          (add-before 'configure 'fix-dlopen-libnames
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let ((out (assoc-ref outputs "out")))
@@ -488,7 +498,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.37.3






^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [bug#58566] Mesa missing patches for Vulkan shared libraries
  2022-10-16 16:51 [bug#58566] [PATCH core-updates] gnu: mesa: Update to 22.2.1 Kaelyn Takata via Guix-patches via
  2022-10-19 15:32 ` [bug#58566] [PATCH core-updates v2 0/1] " Kaelyn Takata via Guix-patches via
  2022-10-19 15:32 ` [bug#58566] [PATCH core-updates v2 1/1] " Kaelyn Takata via Guix-patches via
@ 2022-11-21 19:16 ` Kaelyn via Guix-patches via
  2 siblings, 0 replies; 4+ messages in thread
From: Kaelyn via Guix-patches via @ 2022-11-21 19:16 UTC (permalink / raw)
  To: 58251@debbugs.gnu.org; +Cc: 58566@debbugs.gnu.org

I've just created https://issues.guix.gnu.org/59453 with the patch to mesa on core-updates to fix the library paths in the Vulkan layer manifests. I split the change out from my previous mesa update patch (https://issues.guix.gnu.org/58566) as mesa on core-updates has since been updated to version 22.2.4.




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-11-21 19:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-16 16:51 [bug#58566] [PATCH core-updates] gnu: mesa: Update to 22.2.1 Kaelyn Takata via Guix-patches via
2022-10-19 15:32 ` [bug#58566] [PATCH core-updates v2 0/1] " Kaelyn Takata via Guix-patches via
2022-10-19 15:32 ` [bug#58566] [PATCH core-updates v2 1/1] " Kaelyn Takata via Guix-patches via
2022-11-21 19:16 ` [bug#58566] Mesa missing patches for Vulkan shared libraries Kaelyn via Guix-patches via

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).