summary refs log tree commit diff
path: root/pkgs/development/libraries/mesa
diff options
context:
space:
mode:
authorMichael Weiss <dev.primeos@gmail.com>2020-10-15 16:08:01 +0200
committerGitHub <noreply@github.com>2020-10-15 16:08:01 +0200
commitb13615663c18d92c554c7304cf0398b415647562 (patch)
tree0f3f55b2fbc44aac79103777bb4890b571ce96d9 /pkgs/development/libraries/mesa
parentb623690daf71cb754ac7362e391d858ab6689d2a (diff)
downloadnixpkgs-b13615663c18d92c554c7304cf0398b415647562.tar
nixpkgs-b13615663c18d92c554c7304cf0398b415647562.tar.gz
nixpkgs-b13615663c18d92c554c7304cf0398b415647562.tar.bz2
nixpkgs-b13615663c18d92c554c7304cf0398b415647562.tar.lz
nixpkgs-b13615663c18d92c554c7304cf0398b415647562.tar.xz
nixpkgs-b13615663c18d92c554c7304cf0398b415647562.tar.zst
nixpkgs-b13615663c18d92c554c7304cf0398b415647562.zip
mesa: 20.1.9 -> 20.2.1 (#99091)
Announcements:
- https://docs.mesa3d.org/relnotes/20.2.0.html
- https://docs.mesa3d.org/relnotes/20.2.1.html

I've rebased the patches accordingly and avoided:
meson.build:320: WARNING: Platform `surfaceless` is now always selected; setting this option will be an error in Mesa 20.3
meson.build:324: WARNING: Platform `drm` is now automatically selected; setting this option will be an error in Mesa 20.3
This will also fix the list in the configuration summary:
EGL/Vulkan/VL platforms:   x11 surfaceless wayland drm surfaceless drm
Diffstat (limited to 'pkgs/development/libraries/mesa')
-rw-r--r--pkgs/development/libraries/mesa/default.nix7
-rw-r--r--pkgs/development/libraries/mesa/disk_cache-include-dri-driver-path-in-cache-key.patch29
-rw-r--r--pkgs/development/libraries/mesa/link-radv-with-ld_args_build_id.patch25
-rw-r--r--pkgs/development/libraries/mesa/missing-includes.patch12
4 files changed, 18 insertions, 55 deletions
diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix
index 9fda8091ce4..44097a8a5c0 100644
--- a/pkgs/development/libraries/mesa/default.nix
+++ b/pkgs/development/libraries/mesa/default.nix
@@ -8,7 +8,7 @@
 , galliumDrivers ? ["auto"]
 , driDrivers ? ["auto"]
 , vulkanDrivers ? ["auto"]
-, eglPlatforms ? [ "x11" "surfaceless" ] ++ lib.optionals stdenv.isLinux [ "wayland" "drm" ]
+, eglPlatforms ? [ "x11" ] ++ lib.optionals stdenv.isLinux [ "wayland" ]
 , OpenGL, Xplugin
 , withValgrind ? stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAarch32, valgrind-light
 , enableGalliumNine ? stdenv.isLinux
@@ -31,7 +31,7 @@ with stdenv.lib;
 let
   # Release calendar: https://www.mesa3d.org/release-calendar.html
   # Release frequency: https://www.mesa3d.org/releasing.html#schedule
-  version = "20.1.9";
+  version = "20.2.1";
   branch  = versions.major version;
 in
 
@@ -46,7 +46,7 @@ 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 = "10kk8a8k7f4ip8yaiqdyrx162nbw8pw4h3b4hs4ha8mpd43wlldj";
+    sha256 = "0ji4s1gwcvx3fbj9h0x5zbma6kw4b75vs0266zhc06r97yd6v96i";
   };
 
   prePatch = "patchShebangs .";
@@ -58,7 +58,6 @@ stdenv.mkDerivation {
     ./missing-includes.patch # dev_t needs sys/stat.h, time_t needs time.h, etc.-- fixes build w/musl
     ./opencl-install-dir.patch
     ./disk_cache-include-dri-driver-path-in-cache-key.patch
-    ./link-radv-with-ld_args_build_id.patch
   ]
     ++ lib.optionals stdenv.hostPlatform.isMusl [
       # Fix `-Werror=int-conversion` pthread warnings on musl.
diff --git a/pkgs/development/libraries/mesa/disk_cache-include-dri-driver-path-in-cache-key.patch b/pkgs/development/libraries/mesa/disk_cache-include-dri-driver-path-in-cache-key.patch
index acf3d827c56..fa78f4ae730 100644
--- a/pkgs/development/libraries/mesa/disk_cache-include-dri-driver-path-in-cache-key.patch
+++ b/pkgs/development/libraries/mesa/disk_cache-include-dri-driver-path-in-cache-key.patch
@@ -1,4 +1,4 @@
-From 46b10f2bc28fd79d561c8c49bbae3aee6a4cf0e6 Mon Sep 17 00:00:00 2001
+From 980164fd92f5c2302624cd046d30ff21e6e4ba8a Mon Sep 17 00:00:00 2001
 From: David McFarland <corngood@gmail.com>
 Date: Mon, 6 Aug 2018 15:52:11 -0300
 Subject: [PATCH] disk_cache: include dri driver path in cache key
@@ -12,10 +12,10 @@ timestamps in /nix/store are zero.
  3 files changed, 15 insertions(+), 1 deletion(-)
 
 diff --git a/meson_options.txt b/meson_options.txt
-index 1a2dd8ebd12..2ac741af5a6 100644
+index 2d39d13b6ad..daf06480a60 100644
 --- a/meson_options.txt
 +++ b/meson_options.txt
-@@ -348,6 +348,12 @@ option(
+@@ -368,6 +368,12 @@ option(
    value : true,
    description : 'Enable direct rendering in GLX and EGL for DRI',
  )
@@ -26,13 +26,13 @@ index 1a2dd8ebd12..2ac741af5a6 100644
 +  description : 'Mesa cache key.'
 +)
  option(
-   'I-love-half-baked-turnips',
+   'prefer-iris',
    type : 'boolean',
 diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c
-index d1f14736725..2ed328f292e 100644
+index a92d621927a..3bd65c6890c 100644
 --- a/src/util/disk_cache.c
 +++ b/src/util/disk_cache.c
-@@ -402,8 +402,10 @@ disk_cache_create(const char *gpu_name, const char *driver_id,
+@@ -401,8 +401,10 @@ disk_cache_create(const char *gpu_name, const char *driver_id,
  
     /* Create driver id keys */
     size_t id_size = strlen(driver_id) + 1;
@@ -43,7 +43,7 @@ index d1f14736725..2ed328f292e 100644
     cache->driver_keys_blob_size += gpu_name_size;
  
     /* We sometimes store entire structs that contains a pointers in the cache,
-@@ -424,6 +426,7 @@ disk_cache_create(const char *gpu_name, const char *driver_id,
+@@ -423,6 +425,7 @@ disk_cache_create(const char *gpu_name, const char *driver_id,
     uint8_t *drv_key_blob = cache->driver_keys_blob;
     DRV_KEY_CPY(drv_key_blob, &cache_version, cv_size)
     DRV_KEY_CPY(drv_key_blob, driver_id, id_size)
@@ -52,22 +52,23 @@ index d1f14736725..2ed328f292e 100644
     DRV_KEY_CPY(drv_key_blob, &ptr_size, ptr_size_size)
     DRV_KEY_CPY(drv_key_blob, &driver_flags, driver_flags_size)
 diff --git a/src/util/meson.build b/src/util/meson.build
-index 9da29cc7390..5f549bb1d99 100644
+index 0893f64793b..d46ce85a85f 100644
 --- a/src/util/meson.build
 +++ b/src/util/meson.build
-@@ -170,7 +170,12 @@ _libmesa_util = static_library(
-   include_directories : inc_common,
+@@ -179,7 +179,12 @@ _libmesa_util = static_library(
+   include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux],
    dependencies : deps_for_libmesa_util,
    link_with: libmesa_format,
--  c_args : [c_msvc_compat_args, c_vis_args],
+-  c_args : [c_msvc_compat_args],
 +  c_args : [
-+    c_msvc_compat_args, c_vis_args,
++    c_msvc_compat_args,
 +    '-DDISK_CACHE_KEY="@0@"'.format(
 +      get_option('disk-cache-key')
 +    ),
 +  ],
+   gnu_symbol_visibility : 'hidden',
    build_by_default : false
  )
- 
 -- 
-2.25.1
+2.28.0
+
diff --git a/pkgs/development/libraries/mesa/link-radv-with-ld_args_build_id.patch b/pkgs/development/libraries/mesa/link-radv-with-ld_args_build_id.patch
deleted file mode 100644
index 0a660332392..00000000000
--- a/pkgs/development/libraries/mesa/link-radv-with-ld_args_build_id.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From b49bcb6eece322b70fc2e8b0c8498f5a38ea7b82 Mon Sep 17 00:00:00 2001
-From: David McFarland <corngood@gmail.com>
-Date: Sun, 26 Jul 2020 17:29:49 -0300
-Subject: [PATCH] link radv with ld_args_build_id
-
-This is needed for radv_device_get_cache_uuid to work correctly.
----
- src/amd/vulkan/meson.build | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/amd/vulkan/meson.build b/src/amd/vulkan/meson.build
-index eec026e8f60..a07a0821938 100644
---- a/src/amd/vulkan/meson.build
-+++ b/src/amd/vulkan/meson.build
-@@ -183,7 +183,7 @@ libvulkan_radeon = shared_library(
-   ],
-   c_args : [c_vis_args, no_override_init_args, radv_flags],
-   cpp_args : [cpp_vis_args, radv_flags],
--  link_args : [ld_args_bsymbolic, ld_args_gc_sections, libvulkan_radeon_ld_args],
-+  link_args : [ld_args_build_id, ld_args_bsymbolic, ld_args_gc_sections, libvulkan_radeon_ld_args],
-   link_depends : [libvulkan_radeon_link_depends,],
-   install : true,
- )
---
-2.28.0
diff --git a/pkgs/development/libraries/mesa/missing-includes.patch b/pkgs/development/libraries/mesa/missing-includes.patch
index 9685a1619a5..72488893c6b 100644
--- a/pkgs/development/libraries/mesa/missing-includes.patch
+++ b/pkgs/development/libraries/mesa/missing-includes.patch
@@ -9,18 +9,6 @@
  #include "pipe/p_compiler.h"
  #include "pipe/p_state.h"
  
---- ./src/util/rand_xor.c.orig	2017-06-20 00:38:57.199474067 +0200
-+++ ./src/util/rand_xor.c	2017-06-20 00:40:31.351279557 +0200
-@@ -23,7 +23,9 @@
-  */
- 
- #if defined(__linux__)
-+#include <sys/types.h>
- #include <sys/file.h>
-+#include <sys/stat.h>
- #include <unistd.h>
- #include <fcntl.h>
- #else
 --- ./src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h
 +++ ./src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h
 @@ -28,6 +28,8 @@