From c0b6513803f151e8af2405fbd656bdbde0cd3830 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Fri, 23 Apr 2021 12:17:55 +0200 Subject: [PATCH 1/8] mesa: Cleanup enableRadv (not used anymore) --- pkgs/development/libraries/mesa/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index 2eccde09d8b..0d89eaa7c5f 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -5,7 +5,6 @@ , llvmPackages, libffi, libomxil-bellagio, libva-minimal , libelf, libvdpau , libglvnd -, enableRadv ? true , galliumDrivers ? ["auto"] , driDrivers ? ["auto"] , vulkanDrivers ? ["auto"] From e0e0ca92a65ac305aa611ba434622e7c6ae21428 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Fri, 23 Apr 2021 12:07:02 +0200 Subject: [PATCH 2/8] mesa: 21.0.1 -> 21.0.3 Note: The update to Mesa 21.0.2 was reverted (25ae1fd29f8) because it caused major issues with Sway (segfault on startup [0]). This is still the case and might affect all packages that directly depend on "mesa" (for libgbm or libglapi) but it only causes issues when the package depends on a "mesa" version that differs from "mesa.drivers" used for "/run/opengl-driver/". I've noticed this while testing Mesa updates with the NixOS option "hardware.opengl.package" (as usual) instead of rebuilding my whole system (which would work). Unfortunately this can/will likely also cause issues when mixing different channels, using Flakes/Overlays, etc. The cause of this should be similar to [1] ("mesa" updates now cause the same issues that "glibc" updates already do, maybe triggered by certain Mesa changes) and some additional discussions is in [2],[3]. Note: Don't backport this to NixOS 21.05, at least not without careful consideration. [0]: https://github.com/NixOS/nixpkgs/pull/118753#issuecomment-818950977 [1]: https://github.com/NixOS/nixpkgs/issues/95808 [2]: https://github.com/NixOS/nixpkgs/pull/120325 [3]: https://github.com/NixOS/nixpkgs/pull/119558 --- pkgs/development/libraries/mesa/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index 0d89eaa7c5f..615777e46de 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -31,7 +31,7 @@ with lib; let # Release calendar: https://www.mesa3d.org/release-calendar.html # Release frequency: https://www.mesa3d.org/releasing.html#schedule - version = "21.0.1"; + version = "21.0.3"; branch = versions.major version; self = stdenv.mkDerivation { @@ -45,7 +45,7 @@ self = stdenv.mkDerivation { "ftp://ftp.freedesktop.org/pub/mesa/${version}/mesa-${version}.tar.xz" "ftp://ftp.freedesktop.org/pub/mesa/older-versions/${branch}.x/${version}/mesa-${version}.tar.xz" ]; - sha256 = "1fqj2xhhd1ary0pfg31jq6fqcnd6qgyrw1445nmz554k8n2ck7rp"; + sha256 = "0awiyvicvcn3b18x0vx5ik3ly0k3k51ivz2ljj8pnx6ms95nyp2n"; }; prePatch = "patchShebangs ."; From 71e0180f6f6f80b8d94a3b579b91cb8347bc2261 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Thu, 15 Apr 2021 20:38:05 +0200 Subject: [PATCH 3/8] mesa: 21.0.3 -> 21.1.1 Note: This update likely causes some issues when running an application that has a direct dependency on Mesa (e.g. Sway and XWayland) and was compiled against a different Nixpkgs revision. See 7106fca0fe4 for more details regarding that issue. --- pkgs/development/libraries/mesa/default.nix | 4 ++-- .../libraries/mesa/missing-includes.patch | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index 615777e46de..2f9f7df04cf 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -31,7 +31,7 @@ with lib; let # Release calendar: https://www.mesa3d.org/release-calendar.html # Release frequency: https://www.mesa3d.org/releasing.html#schedule - version = "21.0.3"; + version = "21.1.1"; branch = versions.major version; self = stdenv.mkDerivation { @@ -45,7 +45,7 @@ self = stdenv.mkDerivation { "ftp://ftp.freedesktop.org/pub/mesa/${version}/mesa-${version}.tar.xz" "ftp://ftp.freedesktop.org/pub/mesa/older-versions/${branch}.x/${version}/mesa-${version}.tar.xz" ]; - sha256 = "0awiyvicvcn3b18x0vx5ik3ly0k3k51ivz2ljj8pnx6ms95nyp2n"; + sha256 = "1lldnf307w6j0d874544f1dinn0gnnp1ds2xph8qjkh5g6imxhpf"; }; prePatch = "patchShebangs ."; diff --git a/pkgs/development/libraries/mesa/missing-includes.patch b/pkgs/development/libraries/mesa/missing-includes.patch index 72488893c6b..c17d5490855 100644 --- a/pkgs/development/libraries/mesa/missing-includes.patch +++ b/pkgs/development/libraries/mesa/missing-includes.patch @@ -9,14 +9,14 @@ #include "pipe/p_compiler.h" #include "pipe/p_state.h" ---- ./src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h -+++ ./src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h +--- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h ++++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h @@ -28,6 +28,8 @@ #ifndef RADV_AMDGPU_WINSYS_H #define RADV_AMDGPU_WINSYS_H - + +#include + - #include "radv_radeon_winsys.h" - #include "ac_gpu_info.h" - #include "addrlib/addrinterface.h" + #include + #include + #include "util/list.h" From 00f0ce0618d037ac49e6d17745642bab6710a653 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Wed, 2 Jun 2021 22:55:34 +0200 Subject: [PATCH 4/8] mesa: 21.1.1 -> 21.1.2 --- pkgs/development/libraries/mesa/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index 2f9f7df04cf..d68e96944d0 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -31,7 +31,7 @@ with lib; let # Release calendar: https://www.mesa3d.org/release-calendar.html # Release frequency: https://www.mesa3d.org/releasing.html#schedule - version = "21.1.1"; + version = "21.1.2"; branch = versions.major version; self = stdenv.mkDerivation { @@ -45,7 +45,7 @@ self = stdenv.mkDerivation { "ftp://ftp.freedesktop.org/pub/mesa/${version}/mesa-${version}.tar.xz" "ftp://ftp.freedesktop.org/pub/mesa/older-versions/${branch}.x/${version}/mesa-${version}.tar.xz" ]; - sha256 = "1lldnf307w6j0d874544f1dinn0gnnp1ds2xph8qjkh5g6imxhpf"; + sha256 = "0pw2wba4q66rhdx0hpimvxmrl7k2vv315gmmk17kl7snc0vvdd13"; }; prePatch = "patchShebangs ."; From 89ed4b143d90ba6c38599ef458eaeae60e7ce7ea Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Sun, 6 Jun 2021 16:30:11 -0700 Subject: [PATCH 5/8] mesa: fix darwin build --- pkgs/development/libraries/mesa/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index d68e96944d0..32538bc5f21 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -4,7 +4,7 @@ , expat, libdrm, xorg, wayland, wayland-protocols, openssl , llvmPackages, libffi, libomxil-bellagio, libva-minimal , libelf, libvdpau -, libglvnd +, libglvnd, libunwind , galliumDrivers ? ["auto"] , driDrivers ? ["auto"] , vulkanDrivers ? ["auto"] @@ -127,6 +127,7 @@ self = stdenv.mkDerivation { libpthreadstubs openssl /*or another sha1 provider*/ ] ++ lib.optionals (elem "wayland" eglPlatforms) [ wayland wayland-protocols ] ++ lib.optionals stdenv.isLinux [ libomxil-bellagio libva-minimal ] + ++ lib.optionals stdenv.isDarwin [ libunwind ] ++ lib.optional withValgrind valgrind-light; depsBuildBuild = [ pkg-config ]; From 21ffa4a1b366edafd53c67fc6be1f2a496972782 Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Fri, 11 Jun 2021 19:06:07 -0700 Subject: [PATCH 6/8] mesa: Add patch for RISC-V driver selection --- pkgs/development/libraries/mesa/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index 32538bc5f21..9c4b0dd31c3 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -64,6 +64,11 @@ self = stdenv.mkDerivation { url = "https://gitlab.freedesktop.org/mesa/mesa/commit/aebbf819df6d1e.patch"; sha256 = "17248hyzg43d73c86p077m4lv1pkncaycr3l27hwv9k4ija9zl8q"; }) + (fetchpatch { + name = "add-riscv-default-selections.patch"; + url = "https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11346.patch"; + sha256 = "1nwqslr1g6m83i0r40710havkyf03yxkgaiwgxz2zlw2xkbrnzw0"; + }) ] ++ optionals (stdenv.isDarwin && stdenv.isAarch64) [ # Fix aarch64-darwin build, remove when upstreaam supports it out of the box. # See: https://gitlab.freedesktop.org/mesa/mesa/-/issues/1020 From d7b32a155abd209eb520cb36d42ae958083d36ca Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Fri, 18 Jun 2021 22:31:45 +0200 Subject: [PATCH 7/8] mesa: 21.1.2 -> 21.1.3 I've also updated the URL for the RISC-V patch in case the content of the old URL will change (not sure if that's possible after a merge request is merged but now that the patch is upstream it seems like a good idea regardless; and the content has actually already changed so the old hash wasn't correct anymore). --- pkgs/development/libraries/mesa/default.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index 9c4b0dd31c3..4759e106624 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -31,7 +31,7 @@ with lib; let # Release calendar: https://www.mesa3d.org/release-calendar.html # Release frequency: https://www.mesa3d.org/releasing.html#schedule - version = "21.1.2"; + version = "21.1.3"; branch = versions.major version; self = stdenv.mkDerivation { @@ -45,7 +45,7 @@ self = stdenv.mkDerivation { "ftp://ftp.freedesktop.org/pub/mesa/${version}/mesa-${version}.tar.xz" "ftp://ftp.freedesktop.org/pub/mesa/older-versions/${branch}.x/${version}/mesa-${version}.tar.xz" ]; - sha256 = "0pw2wba4q66rhdx0hpimvxmrl7k2vv315gmmk17kl7snc0vvdd13"; + sha256 = "0s8yi7y63xsyqw19ihil18fykkjxr6ibcir2fvymz1vh4ql23qnb"; }; prePatch = "patchShebangs ."; @@ -64,10 +64,11 @@ self = stdenv.mkDerivation { url = "https://gitlab.freedesktop.org/mesa/mesa/commit/aebbf819df6d1e.patch"; sha256 = "17248hyzg43d73c86p077m4lv1pkncaycr3l27hwv9k4ija9zl8q"; }) + # For RISC-V support: (fetchpatch { name = "add-riscv-default-selections.patch"; - url = "https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11346.patch"; - sha256 = "1nwqslr1g6m83i0r40710havkyf03yxkgaiwgxz2zlw2xkbrnzw0"; + url = "https://gitlab.freedesktop.org/mesa/mesa/-/commit/9908da1b7a5eaf0156d458e0e24b694c070ba345.patch"; + sha256 = "036gv95m5gzzs6qpgkydf5fwgdlm7kpbdfalg8vmayghd260rw1w"; }) ] ++ optionals (stdenv.isDarwin && stdenv.isAarch64) [ # Fix aarch64-darwin build, remove when upstreaam supports it out of the box. From c6f1d6bf1e8ef58fd257c4e8b944edb0c54365f0 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Thu, 1 Jul 2021 11:18:11 +0200 Subject: [PATCH 8/8] mesa: 21.1.3 -> 21.1.4 --- pkgs/development/libraries/mesa/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index 4759e106624..12ff9164809 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -31,7 +31,7 @@ with lib; let # Release calendar: https://www.mesa3d.org/release-calendar.html # Release frequency: https://www.mesa3d.org/releasing.html#schedule - version = "21.1.3"; + version = "21.1.4"; branch = versions.major version; self = stdenv.mkDerivation { @@ -45,7 +45,7 @@ self = stdenv.mkDerivation { "ftp://ftp.freedesktop.org/pub/mesa/${version}/mesa-${version}.tar.xz" "ftp://ftp.freedesktop.org/pub/mesa/older-versions/${branch}.x/${version}/mesa-${version}.tar.xz" ]; - sha256 = "0s8yi7y63xsyqw19ihil18fykkjxr6ibcir2fvymz1vh4ql23qnb"; + sha256 = "02z9g6zpkg1p1sm8f84xdi7v2n7x534x9pn565bvcr411527y5qz"; }; prePatch = "patchShebangs .";