From a670f0800c49cded356b9561af39348e3f02b270 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Thu, 13 Jan 2022 20:24:33 +0100 Subject: mesa: 21.3.3 -> 21.3.4 (cherry picked from commit c1a712267026f3a2c7d1b0bd48db4842b0595409) --- .../pkgs/development/libraries/mesa/default.nix | 12 +++-- nixpkgs/pkgs/development/libraries/mesa/musl.patch | 59 ++++++++++++++++++++++ 2 files changed, 66 insertions(+), 5 deletions(-) create mode 100644 nixpkgs/pkgs/development/libraries/mesa/musl.patch (limited to 'nixpkgs/pkgs/development/libraries/mesa') diff --git a/nixpkgs/pkgs/development/libraries/mesa/default.nix b/nixpkgs/pkgs/development/libraries/mesa/default.nix index cb1d99aff2ca..69f43d31da71 100644 --- a/nixpkgs/pkgs/development/libraries/mesa/default.nix +++ b/nixpkgs/pkgs/development/libraries/mesa/default.nix @@ -33,7 +33,7 @@ with lib; let # Release calendar: https://www.mesa3d.org/release-calendar.html # Release frequency: https://www.mesa3d.org/releasing.html#schedule - version = "21.3.3"; + version = "21.3.4"; branch = versions.major version; self = stdenv.mkDerivation { @@ -47,18 +47,20 @@ 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 = "08c118j440xpfbjjxmwzm6dfnv4y35q540mmzkchhpbwx89lczxd"; + sha256 = "0zd6skf9qcwlk1k1ljgwijwlyz5si3pgi0h97gd6kkivm7a4y43p"; }; # TODO: # revive ./dricore-gallium.patch when it gets ported (from Ubuntu), as it saved # ~35 MB in $drivers; watch https://launchpad.net/ubuntu/+source/mesa/+changelog patches = [ - # fixes pkgsMusl.mesa build + # To fix flickering on Intel GPUs (iris), see https://github.com/NixOS/nixpkgs/issues/153377: (fetchpatch { - url = "https://raw.githubusercontent.com/void-linux/void-packages/b9f58f303ae23754c95d5d1fe87a98b5a2d8f271/srcpkgs/mesa/patches/musl.patch"; - sha256 = "sha256-Jyl7ILLhn8hBJG7afnEjE8H56Wz/1bxkvlqfrXK5U7I="; + url = "https://gitlab.freedesktop.org/mesa/mesa/-/commit/07dc3d4238e57901ccf98e0b506d9aad2c86b9d9.diff"; + sha256 = "sha256-3fa1qHJes3x1/iXsxfjgy9HnEGlOyFtJatSkU1a3XDI="; }) + # fixes pkgsMusl.mesa build + ./musl.patch (fetchpatch { url = "https://raw.githubusercontent.com/void-linux/void-packages/b9f58f303ae23754c95d5d1fe87a98b5a2d8f271/srcpkgs/mesa/patches/musl-endian.patch"; sha256 = "sha256-eRc91qCaFlVzrxFrNUPpAHd1gsqKsLCCN0IW8pBQcqk="; diff --git a/nixpkgs/pkgs/development/libraries/mesa/musl.patch b/nixpkgs/pkgs/development/libraries/mesa/musl.patch new file mode 100644 index 000000000000..687a159c1788 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/mesa/musl.patch @@ -0,0 +1,59 @@ +diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h +index 06ca90564f0..bb244f8f358 100644 +--- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h ++++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h +@@ -30,6 +30,7 @@ + + #include + #include ++#include + #include "util/list.h" + #include "util/rwlock.h" + #include "ac_gpu_info.h" +diff --git a/src/gallium/drivers/freedreno/freedreno_util.h b/src/gallium/drivers/freedreno/freedreno_util.h +index 22f99c41909..2f3195926be 100644 +--- a/src/gallium/drivers/freedreno/freedreno_util.h ++++ b/src/gallium/drivers/freedreno/freedreno_util.h +@@ -108,6 +108,8 @@ extern bool fd_binning_enabled; + #include + #include + ++#define gettid() ((pid_t)syscall(SYS_gettid)) ++ + #define DBG(fmt, ...) \ + do { \ + if (FD_DBG(MSGS)) \ +diff --git a/src/gallium/frontends/nine/nine_debug.c b/src/gallium/frontends/nine/nine_debug.c +index f3a6a945025..f4a6c41a612 100644 +--- a/src/gallium/frontends/nine/nine_debug.c ++++ b/src/gallium/frontends/nine/nine_debug.c +@@ -65,7 +65,7 @@ _nine_debug_printf( unsigned long flag, + { + static boolean first = TRUE; + static unsigned long dbg_flags = DBG_ERROR | DBG_WARN; +- unsigned long tid = 0; ++ pthread_t tid = 0; + + if (first) { + first = FALSE; +@@ -74,7 +74,7 @@ _nine_debug_printf( unsigned long flag, + + #if defined(HAVE_PTHREAD) + if (dbg_flags & DBG_TID) +- tid = (unsigned long)pthread_self(); ++ tid = pthread_self(); + #endif + + if (dbg_flags & flag) { +diff --git a/src/util/rand_xor.c b/src/util/rand_xor.c +index 81b64f1ea71..56ebd2eccdf 100644 +--- a/src/util/rand_xor.c ++++ b/src/util/rand_xor.c +@@ -28,6 +28,7 @@ + #if defined(HAVE_GETRANDOM) + #include + #endif ++#include /* size_t, ssize_t */ + #include + #include + #endif -- cgit 1.4.1