Subject: [bug#63219] [PATCH mesa-branch v3 4/4] gnu: mesa: Update to 23.0.3.

From: Kaelyn Takata <[email-masked]>
Date: Thu, 04 May 2023 20:12:46 +0000

* 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 <[email-masked]>
-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 <[email-masked]>
-    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