about summary refs log tree commit diff
path: root/pkgs/development/libraries/mesa
diff options
context:
space:
mode:
authorK900 <me@0upti.me>2024-02-03 13:42:18 +0300
committerK900 <me@0upti.me>2024-02-03 13:42:18 +0300
commit88244b5f75261283681e7486e2b7883973291321 (patch)
treedefbd89f8c9d36c9c7d913590ad84a953adbce77 /pkgs/development/libraries/mesa
parent959fc005557287c579a37e6aaf053c31173a2e5c (diff)
mesa: remove disk cache key override
The cache key isn't derived from a timestamp anymore, but from the build-id,
so we can just rely on that.
Diffstat (limited to 'pkgs/development/libraries/mesa')
-rw-r--r--pkgs/development/libraries/mesa/default.nix2
-rw-r--r--pkgs/development/libraries/mesa/disk_cache-include-dri-driver-path-in-cache-key.patch59
2 files changed, 0 insertions, 61 deletions
diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix
index f1a300ca957bf..a86ea179547f8 100644
--- a/pkgs/development/libraries/mesa/default.nix
+++ b/pkgs/development/libraries/mesa/default.nix
@@ -121,7 +121,6 @@ self = stdenv.mkDerivation {
     ./musl.patch
 
     ./opencl.patch
-    ./disk_cache-include-dri-driver-path-in-cache-key.patch
 
     # Backports to fix build
     # FIXME: remove when applied upstream
@@ -170,7 +169,6 @@ self = stdenv.mkDerivation {
     # https://gitlab.freedesktop.org/mesa/mesa/blob/master/docs/meson.html#L327
     "-Db_ndebug=true"
 
-    "-Ddisk-cache-key=${placeholder "drivers"}"
     "-Ddri-search-path=${libglvnd.driverLink}/lib/dri"
 
     "-Dplatforms=${lib.concatStringsSep "," eglPlatforms}"
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
deleted file mode 100644
index 05f5ec7b6a034..0000000000000
--- a/pkgs/development/libraries/mesa/disk_cache-include-dri-driver-path-in-cache-key.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-diff --git a/meson_options.txt b/meson_options.txt
-index 591ed957c85..6cb550593e3 100644
---- a/meson_options.txt
-+++ b/meson_options.txt
-@@ -519,6 +519,13 @@ option(
-   description : 'Enable direct rendering in GLX and EGL for DRI',
- )
- 
-+option(
-+  'disk-cache-key',
-+  type : 'string',
-+  value : '',
-+  description : 'Mesa cache key.'
-+)
-+
- option('egl-lib-suffix',
-   type : 'string',
-   value : '',
-diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c
-index 1d23b92af7e..fbb4b04f3cf 100644
---- a/src/util/disk_cache.c
-+++ b/src/util/disk_cache.c
-@@ -218,8 +218,10 @@ disk_cache_type_create(const char *gpu_name,
- 
-    /* Create driver id keys */
-    size_t id_size = strlen(driver_id) + 1;
-+   size_t key_size = strlen(DISK_CACHE_KEY) + 1;
-    size_t gpu_name_size = strlen(gpu_name) + 1;
-    cache->driver_keys_blob_size += id_size;
-+   cache->driver_keys_blob_size += key_size;
-    cache->driver_keys_blob_size += gpu_name_size;
- 
-    /* We sometimes store entire structs that contains a pointers in the cache,
-@@ -240,6 +242,7 @@ disk_cache_type_create(const char *gpu_name,
-    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)
-+   DRV_KEY_CPY(drv_key_blob, DISK_CACHE_KEY, key_size)
-    DRV_KEY_CPY(drv_key_blob, gpu_name, gpu_name_size)
-    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 eb88f235c47..eae5c54cc10 100644
---- a/src/util/meson.build
-+++ b/src/util/meson.build
-@@ -286,7 +286,12 @@ _libmesa_util = static_library(
-   include_directories : [inc_util, include_directories('format')],
-   dependencies : deps_for_libmesa_util,
-   link_with: [libmesa_util_sse41],
--  c_args : [c_msvc_compat_args],
-+  c_args : [
-+    c_msvc_compat_args,
-+    '-DDISK_CACHE_KEY="@0@"'.format(
-+      get_option('disk-cache-key')
-+    ),
-+  ],
-   gnu_symbol_visibility : 'hidden',
-   build_by_default : false
- )