[PATCH 0/2][core-updates] gnu: mesa: Update to 22.1.2.

  • Done
  • quality assurance status badge
Details
3 participants
  • Efraim Flashner
  • John Kehayias
  • Tobias Geerinckx-Rice
Owner
unassigned
Submitted by
John Kehayias
Severity
normal
J
J
John Kehayias wrote on 22 Jun 2022 17:31
(name . Guix-patches)(address . guix-patches@gnu.org)
ZykL1niXX_9wz63LxgqXHX7CJqfV7ZaFn9-SEzYscU4VdGDA9BDI3VHo13ZVKk0wl56ITVuVrGRS42xJMPXIZ4rflBXfkNGOCA1AIhcr_8Y=@protonmail.com
Hi Guix,

Incoming are two patches to update Mesa to the latest stable version, 22.1.2 (as of this writing, they move quickly though).

The first patch does the update which needed to drop the configure-flag dri-drivers as those have been dropped from Mesa. They do exist on an alternative branch, but should only be for really old hardware, while there are more current drivers that have been in Mesa for years (the Gallium ones). The configure-flag we had set needed to be dropped for Mesa to build. I could also reenable a test on i686 that was disabled due to it failing with an upstream bug (now closed).

It is hard to parse all the codenames and hardware, but discussion on IRC leads me to believe this is for probably 10+ year old hardware, while some old hardware is supported by newer drivers like the crocus one. Here is one place to see the announcement and related links: https://www.phoronix.com/scan.php?page=news_item&px=Mesa-Classic-Retired

Second patch does a minor clean up to use "auto" where available for gallium-drivers and vulkan-drivers. From parsing the meson build here: https://cgit.freedesktop.org/mesa/mesa/tree/meson.buildI tried to make sure that the "auto" setting is available for the listed architecture and that it has at least as many drivers enabled as we had previously. For example, for vulkan-drivers on x86 it also adds the swrast driver. In other cases either "auto" is not listed for the architecture or it has less drivers than what we currently build. One effect is that the crocus and i915 Gallium drivers are built, which I believe is needed to support some Intel hardware with the dri-drivers dropped.

(I added my copyright line in the second patch, forgot it in the first.)

Note that I tested this builds for x86_64 and i686. I have not tried to run anything with this Mesa nor build on other architectures.

Thanks,
John
J
J
John Kehayias wrote on 22 Jun 2022 17:34
[PATCH 1/2] gnu: mesa: Update to 22.1.2.
(name . 56150@debbugs.gnu.org)(address . 56150@debbugs.gnu.org)
1OKhnGPP9yskCkMkUJ566lQQ0kPPm4zVMBtCdFxvPKMEeixjYGwu2Yt-0ZJdfmolGuIq-qPXn-pJe7xdgz9AuNrTdYeZEJfuLzcROMSWoAI=@protonmail.com
Empty Message
From e89039567166f84f14aab61fa2c0982ac9f40543 Mon Sep 17 00:00:00 2001
From: John Kehayias <john.kehayias@protonmail.com>
Date: Wed, 22 Jun 2022 11:09:33 -0400
Subject: [PATCH 1/2] gnu: mesa: Update to 22.1.2.

* gnu/packages/gl.scm (mesa): Update to 22.1.2.
[configure-flags]: Remove dri-drivers as from v22.0 the Mesa classic OpenGL
drivers were removed.
[phases]: Re-enable test that previously failed on i686.
* gnu/packages/patches/mesa-skip-tests.patch: Update patch for current version.
---
gnu/packages/gl.scm | 20 ++++----------------
gnu/packages/patches/mesa-skip-tests.patch | 19 +++++++++----------
2 files changed, 13 insertions(+), 26 deletions(-)

Toggle diff (83 lines)
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index c740c087dd..6c4594a9a1 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -261,7 +261,7 @@ (define libva-without-mesa
(define-public mesa
(package
(name "mesa")
- (version "21.3.8")
+ (version "22.1.2")
(source
(origin
(method url-fetch)
@@ -273,7 +273,7 @@ (define-public mesa
version "/mesa-" version ".tar.xz")))
(sha256
(base32
- "19wx5plk6z0hhi0zdzxjx8ynl3lhlc5mbd8vhwqyk92kvhxjf3g7"))
+ "1smrvvh8l7xcccwfbccx9k0ihzh1whrnnwsmqb7i0gba99mj4w89"))
(patches
(search-patches "mesa-skip-tests.patch"))))
(build-system meson-build-system)
@@ -357,15 +357,8 @@ (define-public mesa
;; Also enable the tests.
"-Dbuild-tests=true"
- ;; on non-intel systems, drop i915 and i965
- ;; from the default dri drivers
- ,@(match (%current-system)
- ((or "x86_64-linux" "i686-linux")
- '("-Ddri-drivers=i915,i965,nouveau,r200,r100"))
- (_
- '("-Ddri-drivers=nouveau,r200,r100")))
-
- "-Dllvm=enabled") ; default is x86/x86_64 only
+ ;; Enable LLVM; default is x86/x86_64 only.
+ "-Dllvm=enabled")
;; XXX: 'debugoptimized' causes LTO link failures on some drivers. The
;; documentation recommends using 'release' for performance anyway.
@@ -413,11 +406,6 @@ (define-public mesa
;; This test times out and receives SIGTERM.
(substitute* "src/amd/common/meson.build"
(("and not with_platform_windows") "and with_platform_windows"))))
- ("i686-linux"
- ;; Disable new test from Mesa 19 that fails on i686. Upstream
- ;; report: <https://bugs.freedesktop.org/show_bug.cgi?id=110612>.
- `((substitute* "src/util/tests/format/meson.build"
- (("'u_format_test',") ""))))
("aarch64-linux"
;; The ir3_disasm test segfaults.
;; The simplest way to skip it is to run a different test instead.
diff --git a/gnu/packages/patches/mesa-skip-tests.patch b/gnu/packages/patches/mesa-skip-tests.patch
index 7ff571dcf5..af61ea1658 100644
--- a/gnu/packages/patches/mesa-skip-tests.patch
+++ b/gnu/packages/patches/mesa-skip-tests.patch
@@ -5,15 +5,14 @@ completely with this patch:
https://gitlab.freedesktop.org/mesa/mesa/-/issues/4091
diff --git a/src/util/meson.build b/src/util/meson.build
-index 319b22d9bf7..93790c72675 100644
+index 2a1028f0d3a..0d31f38b671 100644
--- a/src/util/meson.build
+++ b/src/util/meson.build
-@@ -344,7 +344,7 @@ if with_tests
- )
- endif
-
-- foreach t: ['bitset', 'register_allocate', 'u_debug_stack', 'u_qsort']
-+ foreach t: ['bitset', 'register_allocate', 'u_qsort']
- test(
- t,
- executable(
+@@ -330,7 +330,6 @@ if with_tests
+ 'tests/set_test.cpp',
+ 'tests/sparse_array_test.cpp',
+ 'tests/u_atomic_test.cpp',
+- 'tests/u_debug_stack_test.cpp',
+ 'tests/u_printf_test.cpp',
+ 'tests/u_qsort_test.cpp',
+ 'tests/vector_test.cpp',
--
2.36.1
J
J
John Kehayias wrote on 22 Jun 2022 17:34
[PATCH 2/2] gnu: mesa: Update configure flags.
(name . 56150@debbugs.gnu.org)(address . 56150@debbugs.gnu.org)
OjI5zciS0ZOA6Ov7z9C-qoa-tZULYdr3sSuI4upIAUv-bsqs0VKjSjK-gpPT5sh6MXv7FhORL9uLtwMTkvXM65eFRiciajLYIhhMfWYlMBw=@protonmail.com
Empty Message
From e18f9c4c1a1875b3ce7a1c5e5585eb4512e7e468 Mon Sep 17 00:00:00 2001
From: John Kehayias <john.kehayias@protonmail.com>
Date: Wed, 22 Jun 2022 11:19:39 -0400
Subject: [PATCH 2/2] gnu: mesa: Update configure flags.

* gnu/packages/gl.scm (mesa)[configure-flags]: Adjust the gallium-drivers and
vulkan-drivers flags to use "auto" where it is available and enables at least
the previously listed drivers.
---
gnu/packages/gl.scm | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)

Toggle diff (43 lines)
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index 6c4594a9a1..a46e06827d 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -15,7 +15,7 @@
;;; Copyright © 2020, 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2020 Kei Kebreau <kkebreau@posteo.net>
;;; Copyright © 2021 Ivan Gankevich <i.gankevich@spbu.ru>
-;;; Copyright © 2021 John Kehayias <john.kehayias@protonmail.com>
+;;; Copyright © 2021, 2022 John Kehayias <john.kehayias@protonmail.com>
;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com>
;;;
;;; This file is part of GNU Guix.
@@ -320,10 +320,10 @@ (define-public mesa
("armhf-linux"
;; Freedreno FTBFS when built on a 64-bit machine.
'("-Dgallium-drivers=etnaviv,kmsro,lima,nouveau,panfrost,r300,r600,swrast,tegra,v3d,vc4,virgl"))
- ((or "powerpc64le-linux" "powerpc-linux" "riscv64-linux")
+ ((or "powerpc64le-linux" "powerpc-linux")
'("-Dgallium-drivers=nouveau,r300,r600,radeonsi,swrast,virgl"))
(_
- '("-Dgallium-drivers=iris,nouveau,r300,r600,radeonsi,svga,swrast,virgl")))
+ '("-Dgallium-drivers=auto")))
;; Enable various optional features. TODO: opencl requires libclc,
;; omx requires libomxil-bellagio
"-Dplatforms=x11,wayland"
@@ -340,14 +340,10 @@ (define-public mesa
;; Explicitly enable Vulkan on some architectures.
,@(match (%current-system)
- ((or "i686-linux" "x86_64-linux")
- '("-Dvulkan-drivers=intel,amd"))
((or "powerpc64le-linux" "powerpc-linux")
'("-Dvulkan-drivers=amd,swrast"))
("aarch64-linux"
'("-Dvulkan-drivers=freedreno,amd,broadcom,swrast"))
- ("riscv64-linux"
- '("-Dvulkan-drivers=amd,swrast"))
(_
'("-Dvulkan-drivers=auto")))
--
2.36.1
J
J
John Kehayias wrote on 22 Jun 2022 17:37
Re: [PATCH 0/2][core-updates] gnu: mesa: Update to 22.1.2.
(name . 56150@debbugs.gnu.org)(address . 56150@debbugs.gnu.org)
sAT7QwsbVOtl74Vq3lQpLilciZNyVleA4prRYyuanVp5Ra7vh5FEzvrA2YzHNpxO6fg4wqhY3xP0DnOQvluYUvYobnnMTncmj5Js_SbfQiw=@protonmail.com
I forgot to mention that while I tagged this for core-updates due to the number of rebuilds (and since core-updates should be the next big merge coming?), I wrote and tested this only on master. There one needs the libdrm and wayland-protocols updates from core-updates (just a version bump). I didn't include those changes since they have already been made on core-updates.
T
T
Tobias Geerinckx-Rice wrote on 2 Jul 2022 03:24
Re: [bug#56150] [PATCH 0/2][core-updates] gnu: mesa: Update to 22.1.2.
(name . John Kehayias)(address . john.kehayias@protonmail.com)(address . 56150@debbugs.gnu.org)
869d4cf49014496f9433ffa646d03a07@tobias.gr
Hi,

I enjoyed a system based on this Mesa for a good week before laptop went
boom (for, I should add, unrelated reasons). This enjoyment included
much VAAPIs, Minetests, and all the good stuff.

For those worried about older hardware, I'll add that said machine is an
X230T from 2012 with 'Intel HD 4000' graphics (so 3rd generation Intel).

In other words, LGTM,

T G-R

Sent from a Web browser. Excuse or enjoy my brevity.
E
E
Efraim Flashner wrote on 6 Jul 2022 13:35
(name . Tobias Geerinckx-Rice)(address . me@tobias.gr)
YsVzm8H5icUG4HZM@3900XT
Thanks everybody. Patches pushed!

--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmLFc5oACgkQQarn3Mo9
g1Emsw//Z45YzWWcyUPLC8pkynDw0GCNFmcEussnZCWVOqY9bJNXmoJVCpGEnBuz
FYvv8/8iKF8l5awfLrw+tO1iEMoRrVCtiih2QV+LRSKtQ+ARK03MFpK2rF9XxAqk
Nrw4k3Pge5YQVt0cO3TN84YG9nGykpqBZUrpR9BIj6Sn4QlhoeN/4WgvGSAHDP02
qf4JyABYwlcmowQpGNg7S1Rxn/9ItGpnXN0bCO1+G04ZpxAlnC6KAivLQHq/+6N1
vJu1fxR5113eD8m9cmCcT4IVJF0kMSFLFxltmn4KDjg8mBB878MIfZUkc2hSQQ9o
F6kWWy7JijXSEP5C6MFGiVpOqLX3axhj1v+tZOAvmcIo8t9h/aoUzAR90zpcWnCm
vYz78JLxp6bDdKEekMIg9Lh3z92Q4OpS8qN7Kyxz/YshF0ohvuMWAQybAOyC4WhK
EK91Ac82v/g/OmtDDaFRQjsvt44pg2BkQ1ZZx6AVgW0d+D0VMeNNlW6PxxWVj3mE
wxJIDTW39UC0aj0cmwZHH4dK1wS/1ICKlGndss0YnEHTzIn4cMMpSfLZI1F/Aquw
a/58xltemPJbyaALqNxDKiIOVCea8UmW6OjQGJAyJUYfaa+oRa7QM2E7yeFPT7WT
TGIqQz44OJs/tQSyfb+51/rkIrX7ryLTPmsLj1tfydVpr1i5k/Q=
=icc6
-----END PGP SIGNATURE-----


Closed
?