import UBI mesa-24.2.8-3.el9_6

This commit is contained in:
eabdullin 2025-09-16 03:30:37 +00:00
parent 4a2146fd72
commit 8b021a8fa7
2 changed files with 139 additions and 1 deletions

128
SOURCES/32886.patch Normal file
View File

@ -0,0 +1,128 @@
From 622f7407d7a002030b24ed384532cb6d585b3479 Mon Sep 17 00:00:00 2001
From: Benjamin ROBIN <dev@benjarobin.fr>
Date: Sun, 5 Jan 2025 16:36:12 +0100
Subject: [PATCH 1/2] util/disk_cache: Do not try to delete old cache if cache
is disabled
Prevent following warning if not running as a normal user:
Failed to create /home for shader cache (Permission denied)---disabling
disk_cache_delete_old_cache() is going to create first the cache directory
using disk_cache_generate_cache_dir(). From mkdir_if_needed(), the stat()
of "/home" is failing with "Permission denied" under some circumstances
when using Firefox.
Fixes: #12168
Fixes: c3bc6991d27c61b5c1b3 ("util/disk_cache: Delete the old multifile cache if using the default.")
Signed-off-by: Benjamin ROBIN <dev@benjarobin.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32886>
---
src/util/disk_cache.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c
index a6940ee494084..391f8cfdc1da9 100644
--- a/src/util/disk_cache.c
+++ b/src/util/disk_cache.c
@@ -232,7 +232,7 @@ disk_cache_create(const char *gpu_name, const char *driver_id,
/* Since switching the default cache to <mesa_shader_cache_db>, remove the
* old cache folder if it hasn't been modified for more than 7 days.
*/
- if (!getenv("MESA_SHADER_CACHE_DIR") && !getenv("MESA_GLSL_CACHE_DIR"))
+ if (!getenv("MESA_SHADER_CACHE_DIR") && !getenv("MESA_GLSL_CACHE_DIR") && disk_cache_enabled())
disk_cache_delete_old_cache();
}
--
GitLab
From 023db569e8f7bf325fba86a1fa4ba984026a532c Mon Sep 17 00:00:00 2001
From: Benjamin ROBIN <dev@benjarobin.fr>
Date: Sun, 5 Jan 2025 17:03:52 +0100
Subject: [PATCH 2/2] docs: Update MESA_SHADER_CACHE_DIR env variable behavior
Update documentation to match implementation of
disk_cache_generate_cache_dir().
Signed-off-by: Benjamin ROBIN <dev@benjarobin.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32886>
---
docs/envvars.rst | 21 ++++++++++++---------
src/util/disk_cache_os.c | 13 +++++++++----
2 files changed, 21 insertions(+), 13 deletions(-)
diff --git a/docs/envvars.rst b/docs/envvars.rst
index 7247158cc5073..e812b9280777a 100644
--- a/docs/envvars.rst
+++ b/docs/envvars.rst
@@ -200,10 +200,11 @@ Core Mesa environment variables
.. envvar:: MESA_SHADER_CACHE_DIR
if set, determines the directory to be used for the on-disk cache of
- compiled shader programs. If this variable is not set, then the cache
- will be stored in ``$XDG_CACHE_HOME/mesa_shader_cache_db`` (if that
- variable is set), or else within ``.cache/mesa_shader_cache_db`` within
- the user's home directory.
+ compiled shader programs. If set then the cache will be stored in
+ ``$MESA_SHADER_CACHE_DIR/mesa_shader_cache_db``. If this variable is not
+ set, then the cache will be stored in
+ ``$XDG_CACHE_HOME/mesa_shader_cache_db`` (if that variable is set), or else
+ within ``.cache/mesa_shader_cache_db`` within the user's home directory.
.. envvar:: MESA_SHADER_CACHE_SHOW_STATS
@@ -218,9 +219,10 @@ Core Mesa environment variables
cache DBs via :envvar:`MESA_DISK_CACHE_READ_ONLY_FOZ_DBS` or
:envvar:`MESA_DISK_CACHE_READ_ONLY_FOZ_DBS_DYNAMIC_LIST`. This
implementation does not support cache size limits via
- :envvar:`MESA_SHADER_CACHE_MAX_SIZE`. If
- :envvar:`MESA_SHADER_CACHE_DIR` is not set, the cache will be stored
- in ``$XDG_CACHE_HOME/mesa_shader_cache_sf`` (if that variable is set)
+ :envvar:`MESA_SHADER_CACHE_MAX_SIZE`. If :envvar:`MESA_SHADER_CACHE_DIR`
+ is set, the cache will be stored in
+ ``$MESA_SHADER_CACHE_DIR/mesa_shader_cache_sf``, or else within
+ ``$XDG_CACHE_HOME/mesa_shader_cache_sf`` (if that variable is set)
or else within ``.cache/mesa_shader_cache_sf`` within the user's home
directory.
@@ -229,8 +231,9 @@ Core Mesa environment variables
if set to 1, enables the multi file on-disk shader cache implementation
instead of the default Mesa-DB cache implementation.
This implementation increases the overall disk usage.
- If :envvar:`MESA_SHADER_CACHE_DIR` is not set, the cache will be stored
- in ``$XDG_CACHE_HOME/mesa_shader_cache`` (if that variable is set)
+ If :envvar:`MESA_SHADER_CACHE_DIR` is set, the cache will be stored in
+ ``$MESA_SHADER_CACHE_DIR/mesa_shader_cache``, or else within
+ ``$XDG_CACHE_HOME/mesa_shader_cache`` (if that variable is set)
or else within ``.cache/mesa_shader_cache`` within the user's home
directory.
diff --git a/src/util/disk_cache_os.c b/src/util/disk_cache_os.c
index 8d6ce428c1823..09051491d332f 100644
--- a/src/util/disk_cache_os.c
+++ b/src/util/disk_cache_os.c
@@ -873,10 +873,15 @@ disk_cache_write_item_to_disk(struct disk_cache_put_job *dc_job,
/* Determine path for cache based on the first defined name as follows:
*
- * $MESA_SHADER_CACHE_DIR
- * $XDG_CACHE_HOME/mesa_shader_cache
- * $HOME/.cache/mesa_shader_cache
- * <pwd.pw_dir>/.cache/mesa_shader_cache
+ * $MESA_SHADER_CACHE_DIR/mesa_shader_cache*
+ * $XDG_CACHE_HOME/mesa_shader_cache*
+ * $HOME/.cache/mesa_shader_cache*
+ * <pwd.pw_dir>/.cache/mesa_shader_cache*
+ *
+ * The directory 'mesa_shader_cache*' is named depending of cache type:
+ * - For DISK_CACHE_MULTI_FILE: mesa_shader_cache
+ * - For DISK_CACHE_SINGLE_FILE: mesa_shader_cache_sf
+ * - For DISK_CACHE_DATABASE: mesa_shader_cache_db
*/
char *
disk_cache_generate_cache_dir(void *mem_ctx, const char *gpu_name,
--
GitLab

View File

@ -68,7 +68,7 @@ Name: mesa
Summary: Mesa graphics libraries
%global ver 24.2.8
Version: %{lua:ver = string.gsub(rpm.expand("%{ver}"), "-", "~"); print(ver)}
Release: 2%{?dist}
Release: 3%{?dist}
License: MIT AND BSD-3-Clause AND SGI-B-2.0
URL: http://www.mesa3d.org
@ -115,6 +115,11 @@ Patch10: gnome-shell-glthread-disable.patch
# https://issues.redhat.com/browse/RHEL-53419
Patch11: RHEL-53423.patch
# Fix for firefox crash seen on NV dGFX
# Backport fixes for firefox crash seen on NV dGFX
# https://issues.redhat.com/browse/RHEL-107885
Patch12: 32886.patch
# Build our own version but keep the dependency for the RPM macros
BuildRequires: meson
BuildRequires: gcc
@ -854,6 +859,11 @@ popd
%endif
%changelog
* Tue Aug 5 2025 Anusha Srivatsa <asrivats@redhat.com> - 24.2.8-3
- NV dGFX fix for firefox crashing
Backport fixes for NV dGFX driver crashing firefox
Resolves: https://issues.redhat.com/browse/RHEL-107885
* Thu Feb 13 2025 José Expósito <jexposit@redhat.com> - 24.2.8-2
- AMD Navi4x support
Backport fixes for radeonsi and disable GFX12 on radv