From 8b021a8fa7de72ea1e4f0e90b69ef10ef382ba31 Mon Sep 17 00:00:00 2001 From: eabdullin Date: Tue, 16 Sep 2025 03:30:37 +0000 Subject: [PATCH] import UBI mesa-24.2.8-3.el9_6 --- SOURCES/32886.patch | 128 ++++++++++++++++++++++++++++++++++++++++++++ SPECS/mesa.spec | 12 ++++- 2 files changed, 139 insertions(+), 1 deletion(-) create mode 100644 SOURCES/32886.patch diff --git a/SOURCES/32886.patch b/SOURCES/32886.patch new file mode 100644 index 0000000..2bea80b --- /dev/null +++ b/SOURCES/32886.patch @@ -0,0 +1,128 @@ +From 622f7407d7a002030b24ed384532cb6d585b3479 Mon Sep 17 00:00:00 2001 +From: Benjamin ROBIN +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 +Part-of: +--- + 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 , 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 +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 +Part-of: +--- + 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 +- * /.cache/mesa_shader_cache ++ * $MESA_SHADER_CACHE_DIR/mesa_shader_cache* ++ * $XDG_CACHE_HOME/mesa_shader_cache* ++ * $HOME/.cache/mesa_shader_cache* ++ * /.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 + diff --git a/SPECS/mesa.spec b/SPECS/mesa.spec index cd80113..cdc362a 100644 --- a/SPECS/mesa.spec +++ b/SPECS/mesa.spec @@ -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 - 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 - 24.2.8-2 - AMD Navi4x support Backport fixes for radeonsi and disable GFX12 on radv