The package rpms/mesa.git has added or updated architecture specific content in its spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s): https://src.fedoraproject.org/cgit/rpms/mesa.git/commit/?id=61968b4cba1a7db3... https://src.fedoraproject.org/cgit/rpms/mesa.git/commit/?id=e2acc882a102eef4....
Change: +%ifarch %{ix86} +%ifarch %{ix86}
Thanks.
Full change: ============
commit 14dea65a080a0f633025e48a97f6987469cb9e44 Author: José Expósito jexposit@redhat.com Date: Thu Nov 30 10:24:16 2023 +0100
Update to 23.3.0
diff --git a/mesa.spec b/mesa.spec index 8ede41d..ff549f2 100644 --- a/mesa.spec +++ b/mesa.spec @@ -61,7 +61,7 @@
Name: mesa Summary: Mesa graphics libraries -%global ver 23.3.0-rc5 +%global ver 23.3.0 Version: %{lua:ver = string.gsub(rpm.expand("%{ver}"), "-", "~"); print(ver)} Release: %autorelease License: MIT AND BSD-3-Clause AND SGI-B-2.0 diff --git a/sources b/sources index bd382c4..af8892d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (mesa-23.3.0-rc5.tar.xz) = f1c2421ab262da422ed9ac5ca08b0e1c41264373e022de9413c65e1e7e8ee929979d1c80741497a0acba1d118665a7f6076e24139be0c9c70f3fe8f5d319c187 +SHA512 (mesa-23.3.0.tar.xz) = 3568b571974a2c6c0c3a4cc614c851729962e39926f0af906ba91604f9d43c0618db7df004cbec5d9e5dbade2d6bde818608c9aa1686183994d68ad3e6ac4521
commit 34791f7ba8d22d941fdeb5b651c7651930924177 Author: José Expósito jexposit@redhat.com Date: Wed Nov 29 16:34:26 2023 +0100
Update to 23.3.0-rc5
diff --git a/0001-nir-add-deref-follower-builder-for-casts.patch b/0001-nir-add-deref-follower-builder-for-casts.patch deleted file mode 100644 index ae328d2..0000000 --- a/0001-nir-add-deref-follower-builder-for-casts.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 6388896985da7495ad0968322491953894d29637 Mon Sep 17 00:00:00 2001 -From: Faith Ekstrand faith.ekstrand@collabora.com -Date: Wed, 1 Nov 2023 15:38:35 -0500 -Subject: [PATCH] nir: add deref follower builder for casts. - -This fixes intel_clc builds with llvm 17 on gfx125_bvh_build_DFS_DFS -where it dies in the lower indirect derefs pass. - -Co-authored-by: Dave Airlie airlied@redhat.com -Fixes: 4a4e1757381c ("nir: Support deref instructions in lower_var_copies") -Part-of: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25536 ---- - src/compiler/nir/nir_builder.h | 27 ++++++++++++++++++++++++--- - 1 file changed, 24 insertions(+), 3 deletions(-) - -diff --git a/src/compiler/nir/nir_builder.h b/src/compiler/nir/nir_builder.h -index c9f3465406c..d2b5702d3c9 100644 ---- a/src/compiler/nir/nir_builder.h -+++ b/src/compiler/nir/nir_builder.h -@@ -1483,9 +1483,12 @@ nir_build_deref_struct(nir_builder *build, nir_deref_instr *parent, - } - - static inline nir_deref_instr * --nir_build_deref_cast(nir_builder *build, nir_def *parent, -- nir_variable_mode modes, const struct glsl_type *type, -- unsigned ptr_stride) -+nir_build_deref_cast_with_alignment(nir_builder *build, nir_def *parent, -+ nir_variable_mode modes, -+ const struct glsl_type *type, -+ unsigned ptr_stride, -+ unsigned align_mul, -+ unsigned align_offset) - { - nir_deref_instr *deref = - nir_deref_instr_create(build->shader, nir_deref_type_cast); -@@ -1493,6 +1496,8 @@ nir_build_deref_cast(nir_builder *build, nir_def *parent, - deref->modes = modes; - deref->type = type; - deref->parent = nir_src_for_ssa(parent); -+ deref->cast.align_mul = align_mul; -+ deref->cast.align_offset = align_offset; - deref->cast.ptr_stride = ptr_stride; - - nir_def_init(&deref->instr, &deref->def, parent->num_components, -@@ -1503,6 +1508,15 @@ nir_build_deref_cast(nir_builder *build, nir_def *parent, - return deref; - } - -+static inline nir_deref_instr * -+nir_build_deref_cast(nir_builder *build, nir_def *parent, -+ nir_variable_mode modes, const struct glsl_type *type, -+ unsigned ptr_stride) -+{ -+ return nir_build_deref_cast_with_alignment(build, parent, modes, type, -+ ptr_stride, 0, 0); -+} -+ - static inline nir_deref_instr * - nir_alignment_deref_cast(nir_builder *build, nir_deref_instr *parent, - uint32_t align_mul, uint32_t align_offset) -@@ -1570,6 +1584,13 @@ nir_build_deref_follower(nir_builder *b, nir_deref_instr *parent, - - return nir_build_deref_struct(b, parent, leader->strct.index); - -+ case nir_deref_type_cast: -+ return nir_build_deref_cast_with_alignment(b, &parent->def, -+ leader->modes, -+ leader->type, -+ leader->cast.ptr_stride, -+ leader->cast.align_mul, -+ leader->cast.align_offset); - default: - unreachable("Invalid deref instruction type"); - } --- -2.41.0 - diff --git a/0001-zink-Fix-crash-on-zink_create_screen-error-path.patch b/0001-zink-Fix-crash-on-zink_create_screen-error-path.patch deleted file mode 100644 index 892ddc2..0000000 --- a/0001-zink-Fix-crash-on-zink_create_screen-error-path.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 8927e2739b4997312785ea3972044348b9f3b0b4 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= jexposit@redhat.com -Date: Fri, 3 Nov 2023 14:15:06 +0100 -Subject: [PATCH] zink: Fix crash on zink_create_screen error path -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The `zink_internal_create_screen()` function can fail before -`screen->loader_lib` and/or `screen->instance` are initialized. -The `zink_destroy_screen()` doesn't check those cases and crashes. - -The error was found by Fedora's CI. The back trace is available at [1]. - -[1] https://bodhi.fedoraproject.org/updates/FEDORA-2023-c39f82c465 -Fixes: 0c2045553fe4 ("zink: use screen destructor for creation fails") -Signed-off-by: José Expósito jexposit@redhat.com ---- - src/gallium/drivers/zink/zink_screen.c | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c -index 74b575ed658..0edb8d5f35e 100644 ---- a/src/gallium/drivers/zink/zink_screen.c -+++ b/src/gallium/drivers/zink/zink_screen.c -@@ -1520,10 +1520,14 @@ zink_destroy_screen(struct pipe_screen *pscreen) - if (screen->dev) - VKSCR(DestroyDevice)(screen->dev, NULL); - -- VKSCR(DestroyInstance)(screen->instance, NULL); -+ if (screen->instance) -+ VKSCR(DestroyInstance)(screen->instance, NULL); -+ - util_idalloc_mt_fini(&screen->buffer_ids); - -- util_dl_close(screen->loader_lib); -+ if (screen->loader_lib) -+ util_dl_close(screen->loader_lib); -+ - if (screen->drm_fd != -1) - close(screen->drm_fd); - --- -2.41.0 - diff --git a/0001-zink-allow-software-rendering-only-if-selected.patch b/0001-zink-allow-software-rendering-only-if-selected.patch deleted file mode 100644 index 356ffce..0000000 --- a/0001-zink-allow-software-rendering-only-if-selected.patch +++ /dev/null @@ -1,80 +0,0 @@ -From 2a71f06f2938678d89d5ed1372cda6a7b55d964d Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= jexposit@redhat.com -Date: Thu, 16 Nov 2023 12:18:29 +0100 -Subject: [PATCH] zink: allow software rendering only if selected -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -In environments where 3D acceleration is not available, like in a VM, -the behavior before commit 8cd44b884387 ("egl: add automatic zink -fallback loading between hw and sw drivers") was to fallback to swrast. - -This was the output of `eglinfo` in that situation: - - $ eglinfo - [...] - Wayland platform: - EGL driver name: swrast - OpenGL core profile renderer: llvmpipe (LLVM 17.0.4, 256 bits) - -However, after commit 8cd44b884387 ("egl: add automatic zink fallback -loading between hw and sw drivers") Zink support is tested before -falling back to swrast. -Since the system doesn't support 3D acceleration, Zink + software -rendering is used instead of swrast causing issues like the ones -described in #10146. - -In this case, `eglinfo` prints: - - $ eglinfo - [...] - Wayland platform: - EGL driver name: zink - OpenGL core profile renderer: zink Vulkan 1.3(llvmpipe (LLVM 17.0.4, - 256 bits) (MESA_LLVMPIPE)) - -This patch ensures that Zink + software rendering is used only when the -user opts-in by setting `LIBGL_ALWAYS_SOFTWARE` or `D3D_ALWAYS_SOFTWARE` -and swrast is used otherwise. - -After the patch, the output of `eglinfo` is identical to the one before -the regression: - - $ eglinfo - [...] - Wayland platform: - EGL driver name: swrast - OpenGL core profile renderer: llvmpipe (LLVM 17.0.4, 256 bits) - -Resolves: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10146 -Fixes: 8cd44b884387 ("egl: add automatic zink fallback loading between -hw and sw drivers") - -Reviewed-by: Michel Dänzer mdaenzer@redhat.com -Signed-off-by: José Expósito jexposit@redhat.com -Part-of: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26220 ---- - src/gallium/drivers/zink/zink_screen.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c -index 29a377acfb6..50168d8daa1 100644 ---- a/src/gallium/drivers/zink/zink_screen.c -+++ b/src/gallium/drivers/zink/zink_screen.c -@@ -1632,6 +1632,12 @@ choose_pdev(struct zink_screen *screen, int64_t dev_major, int64_t dev_minor) - } - VKSCR(GetPhysicalDeviceProperties)(screen->pdev, &screen->info.props); - -+ /* allow software rendering only if forced by the user */ -+ if (!cpu && screen->info.props.deviceType == VK_PHYSICAL_DEVICE_TYPE_CPU) { -+ screen->pdev = VK_NULL_HANDLE; -+ return; -+ } -+ - screen->info.device_version = screen->info.props.apiVersion; - - /* runtime version is the lesser of the instance version and device version */ --- -2.41.0 - diff --git a/mesa.spec b/mesa.spec index 49ff335..8ede41d 100644 --- a/mesa.spec +++ b/mesa.spec @@ -61,7 +61,7 @@
Name: mesa Summary: Mesa graphics libraries -%global ver 23.3.0-rc2 +%global ver 23.3.0-rc5 Version: %{lua:ver = string.gsub(rpm.expand("%{ver}"), "-", "~"); print(ver)} Release: %autorelease License: MIT AND BSD-3-Clause AND SGI-B-2.0 @@ -74,10 +74,7 @@ Source0: https://archive.mesa3d.org/mesa-%%7Bver%7D.tar.xz Source1: Mesa-MLAA-License-Clarification-Email.txt
Patch10: gnome-shell-glthread-disable.patch -Patch11: 0001-nir-add-deref-follower-builder-for-casts.patch -Patch12: 0001-zink-Fix-crash-on-zink_create_screen-error-path.patch -Patch13: 0001-zink-allow-software-rendering-only-if-selected.patch -Patch14: 0001-zink-initialize-drm_fd-to-1.patch +Patch11: 0001-zink-initialize-drm_fd-to-1.patch
BuildRequires: meson >= 1.2.0 BuildRequires: gcc diff --git a/sources b/sources index ca07f20..bd382c4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (mesa-23.3.0-rc2.tar.xz) = bebb27bcc860ef85b9f17001e00d83bdd4e6172c5ac7bdd3dd143814abe8e3b9443cea436db1df580834609f80ebdb46a01f3c66c141042a80f59434b5fd85aa +SHA512 (mesa-23.3.0-rc5.tar.xz) = f1c2421ab262da422ed9ac5ca08b0e1c41264373e022de9413c65e1e7e8ee929979d1c80741497a0acba1d118665a7f6076e24139be0c9c70f3fe8f5d319c187
commit 61968b4cba1a7db32508870804d0e08a1d96f746 Author: José Expósito jexposit@redhat.com Date: Thu Nov 23 14:35:01 2023 +0100
Set glx-read-only-text on i386
An update on the linker will now refuse to create binaries with a loadable memory segment that has read, write and execute permissions set. mesa creates one unless "glx-read-only-text" is enabled.
Revert commit e2acc882a102 ("Disable rwx segment linker error") and set "glx-read-only-text" instead.
See Nick's comment for more information about the revert: https://bugzilla.redhat.com/show_bug.cgi?id=2250927#c10
Fix: https://bugzilla.redhat.com/show_bug.cgi?id=2250927
diff --git a/mesa.spec b/mesa.spec index 215ebaa..49ff335 100644 --- a/mesa.spec +++ b/mesa.spec @@ -368,19 +368,6 @@ cp %{SOURCE1} docs/ # ensure standard Rust compiler flags are set export RUSTFLAGS="%build_rustflags"
-# An update on the linker will now refuse to create binaries with a loadable -# memory segment that has read, write and execute permissions set. -# mesa creates one unless "glx-read-only-text" is enabled, however, the -# documentation for "glx-read-only-text" reads: -# -# "Disable writable .text section on x86 (decreases performance)" -# -# In order to avoid possible performance regressions, disable the linker error: -# https://bugzilla.redhat.com/show_bug.cgi?id=2250927 -%ifarch %{ix86} -LDFLAGS=-Wl,--no-error-rwx-segments -%endif - # We've gotten a report that enabling LTO for mesa breaks some games. See # https://bugzilla.redhat.com/show_bug.cgi?id=1862771 for details. # Disable LTO for now @@ -430,6 +417,9 @@ LDFLAGS=-Wl,--no-error-rwx-segments -Dlmsensors=disabled \ %endif -Dandroid-libbacktrace=disabled \ +%ifarch %{ix86} + -Dglx-read-only-text=true +%endif %{nil} %meson_build
commit e2acc882a102eef4f3242f4c05729a238d04bccb Author: José Expósito jexposit@redhat.com Date: Thu Nov 23 12:50:44 2023 +0100
Disable rwx segment linker error
An update on the linker will now refuse to create binaries with a loadable memory segment that has read, write and execute permissions set. mesa creates one unless "glx-read-only-text" is enabled, however, the documentation for "glx-read-only-text" reads:
"Disable writable .text section on x86 (decreases performance)"
In order to avoid possible performance regressions, disable the linker error.
Fix: https://bugzilla.redhat.com/show_bug.cgi?id=2250927
diff --git a/mesa.spec b/mesa.spec index 3576cf0..215ebaa 100644 --- a/mesa.spec +++ b/mesa.spec @@ -368,6 +368,19 @@ cp %{SOURCE1} docs/ # ensure standard Rust compiler flags are set export RUSTFLAGS="%build_rustflags"
+# An update on the linker will now refuse to create binaries with a loadable +# memory segment that has read, write and execute permissions set. +# mesa creates one unless "glx-read-only-text" is enabled, however, the +# documentation for "glx-read-only-text" reads: +# +# "Disable writable .text section on x86 (decreases performance)" +# +# In order to avoid possible performance regressions, disable the linker error: +# https://bugzilla.redhat.com/show_bug.cgi?id=2250927 +%ifarch %{ix86} +LDFLAGS=-Wl,--no-error-rwx-segments +%endif + # We've gotten a report that enabling LTO for mesa breaks some games. See # https://bugzilla.redhat.com/show_bug.cgi?id=1862771 for details. # Disable LTO for now
commit 0c855a11aba5d6125a9469900f6c6f885473f3ac Author: José Expósito jexposit@redhat.com Date: Wed Nov 22 13:01:53 2023 +0100
Backport MR #26332 to fix X11 session on VMs
MR: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26332 Mesa bug: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26332
diff --git a/0001-zink-initialize-drm_fd-to-1.patch b/0001-zink-initialize-drm_fd-to-1.patch new file mode 100644 index 0000000..1dd3252 --- /dev/null +++ b/0001-zink-initialize-drm_fd-to-1.patch @@ -0,0 +1,39 @@ +From a89bf9e86a83005befcdcef47a94fff167bdc47b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= jexposit@redhat.com +Date: Wed, 22 Nov 2023 12:48:47 +0100 +Subject: [PATCH] zink: initialize drm_fd to -1 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The `zink_internal_create_screen()` function initializes +`screen->drm_fd` to 0, a valid file descriptor value, via `rzalloc`. + +If an error is found during initialization, the `zink_destroy_screen()` +function is invoked in the `fail` label and the `screen->drm_fd` is +closed because its value is 0 and `screen->drm_fd != -1` is checked. + +Initialize `screen->drm_fd` to -1 to avoid this issue. + +Resolves: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10191 +Signed-off-by: José Expósito jexposit@redhat.com +--- + src/gallium/drivers/zink/zink_screen.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c +index 50168d8daa1..f42f340657b 100644 +--- a/src/gallium/drivers/zink/zink_screen.c ++++ b/src/gallium/drivers/zink/zink_screen.c +@@ -3126,6 +3126,8 @@ zink_internal_create_screen(const struct pipe_screen_config *config, int64_t dev + return NULL; + } + ++ screen->drm_fd = -1; ++ + glsl_type_singleton_init_or_ref(); + zink_debug = debug_get_option_zink_debug(); + if (zink_descriptor_mode == ZINK_DESCRIPTOR_MODE_AUTO) +-- +2.42.0 + diff --git a/mesa.spec b/mesa.spec index b1c3121..3576cf0 100644 --- a/mesa.spec +++ b/mesa.spec @@ -77,6 +77,7 @@ Patch10: gnome-shell-glthread-disable.patch Patch11: 0001-nir-add-deref-follower-builder-for-casts.patch Patch12: 0001-zink-Fix-crash-on-zink_create_screen-error-path.patch Patch13: 0001-zink-allow-software-rendering-only-if-selected.patch +Patch14: 0001-zink-initialize-drm_fd-to-1.patch
BuildRequires: meson >= 1.2.0 BuildRequires: gcc
commit bdefef8468effb913af229e9c6cd48419178c20b Author: José Expósito jexposit@redhat.com Date: Fri Nov 17 10:41:43 2023 +0100
Backport MR #26220 to fix GNOME apps crash
MR: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26220 Fedora bug:https://bugzilla.redhat.com/show_bug.cgi?id=2249725 Mesa bug: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10146
diff --git a/0001-zink-allow-software-rendering-only-if-selected.patch b/0001-zink-allow-software-rendering-only-if-selected.patch new file mode 100644 index 0000000..356ffce --- /dev/null +++ b/0001-zink-allow-software-rendering-only-if-selected.patch @@ -0,0 +1,80 @@ +From 2a71f06f2938678d89d5ed1372cda6a7b55d964d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= jexposit@redhat.com +Date: Thu, 16 Nov 2023 12:18:29 +0100 +Subject: [PATCH] zink: allow software rendering only if selected +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +In environments where 3D acceleration is not available, like in a VM, +the behavior before commit 8cd44b884387 ("egl: add automatic zink +fallback loading between hw and sw drivers") was to fallback to swrast. + +This was the output of `eglinfo` in that situation: + + $ eglinfo + [...] + Wayland platform: + EGL driver name: swrast + OpenGL core profile renderer: llvmpipe (LLVM 17.0.4, 256 bits) + +However, after commit 8cd44b884387 ("egl: add automatic zink fallback +loading between hw and sw drivers") Zink support is tested before +falling back to swrast. +Since the system doesn't support 3D acceleration, Zink + software +rendering is used instead of swrast causing issues like the ones +described in #10146. + +In this case, `eglinfo` prints: + + $ eglinfo + [...] + Wayland platform: + EGL driver name: zink + OpenGL core profile renderer: zink Vulkan 1.3(llvmpipe (LLVM 17.0.4, + 256 bits) (MESA_LLVMPIPE)) + +This patch ensures that Zink + software rendering is used only when the +user opts-in by setting `LIBGL_ALWAYS_SOFTWARE` or `D3D_ALWAYS_SOFTWARE` +and swrast is used otherwise. + +After the patch, the output of `eglinfo` is identical to the one before +the regression: + + $ eglinfo + [...] + Wayland platform: + EGL driver name: swrast + OpenGL core profile renderer: llvmpipe (LLVM 17.0.4, 256 bits) + +Resolves: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10146 +Fixes: 8cd44b884387 ("egl: add automatic zink fallback loading between +hw and sw drivers") + +Reviewed-by: Michel Dänzer mdaenzer@redhat.com +Signed-off-by: José Expósito jexposit@redhat.com +Part-of: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26220 +--- + src/gallium/drivers/zink/zink_screen.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c +index 29a377acfb6..50168d8daa1 100644 +--- a/src/gallium/drivers/zink/zink_screen.c ++++ b/src/gallium/drivers/zink/zink_screen.c +@@ -1632,6 +1632,12 @@ choose_pdev(struct zink_screen *screen, int64_t dev_major, int64_t dev_minor) + } + VKSCR(GetPhysicalDeviceProperties)(screen->pdev, &screen->info.props); + ++ /* allow software rendering only if forced by the user */ ++ if (!cpu && screen->info.props.deviceType == VK_PHYSICAL_DEVICE_TYPE_CPU) { ++ screen->pdev = VK_NULL_HANDLE; ++ return; ++ } ++ + screen->info.device_version = screen->info.props.apiVersion; + + /* runtime version is the lesser of the instance version and device version */ +-- +2.41.0 + diff --git a/mesa.spec b/mesa.spec index ba4c67e..b1c3121 100644 --- a/mesa.spec +++ b/mesa.spec @@ -76,6 +76,7 @@ Source1: Mesa-MLAA-License-Clarification-Email.txt Patch10: gnome-shell-glthread-disable.patch Patch11: 0001-nir-add-deref-follower-builder-for-casts.patch Patch12: 0001-zink-Fix-crash-on-zink_create_screen-error-path.patch +Patch13: 0001-zink-allow-software-rendering-only-if-selected.patch
BuildRequires: meson >= 1.2.0 BuildRequires: gcc
commit 105bbeabc12599c86e3822e7a456a289a07b25f5 Author: José Expósito jexposit@redhat.com Date: Fri Nov 3 14:38:57 2023 +0100
Backport MR #26029 to fix installer crash
Found by CI: https://bodhi.fedoraproject.org/updates/FEDORA-2023-c39f82c465
diff --git a/0001-zink-Fix-crash-on-zink_create_screen-error-path.patch b/0001-zink-Fix-crash-on-zink_create_screen-error-path.patch new file mode 100644 index 0000000..892ddc2 --- /dev/null +++ b/0001-zink-Fix-crash-on-zink_create_screen-error-path.patch @@ -0,0 +1,45 @@ +From 8927e2739b4997312785ea3972044348b9f3b0b4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= jexposit@redhat.com +Date: Fri, 3 Nov 2023 14:15:06 +0100 +Subject: [PATCH] zink: Fix crash on zink_create_screen error path +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The `zink_internal_create_screen()` function can fail before +`screen->loader_lib` and/or `screen->instance` are initialized. +The `zink_destroy_screen()` doesn't check those cases and crashes. + +The error was found by Fedora's CI. The back trace is available at [1]. + +[1] https://bodhi.fedoraproject.org/updates/FEDORA-2023-c39f82c465 +Fixes: 0c2045553fe4 ("zink: use screen destructor for creation fails") +Signed-off-by: José Expósito jexposit@redhat.com +--- + src/gallium/drivers/zink/zink_screen.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c +index 74b575ed658..0edb8d5f35e 100644 +--- a/src/gallium/drivers/zink/zink_screen.c ++++ b/src/gallium/drivers/zink/zink_screen.c +@@ -1520,10 +1520,14 @@ zink_destroy_screen(struct pipe_screen *pscreen) + if (screen->dev) + VKSCR(DestroyDevice)(screen->dev, NULL); + +- VKSCR(DestroyInstance)(screen->instance, NULL); ++ if (screen->instance) ++ VKSCR(DestroyInstance)(screen->instance, NULL); ++ + util_idalloc_mt_fini(&screen->buffer_ids); + +- util_dl_close(screen->loader_lib); ++ if (screen->loader_lib) ++ util_dl_close(screen->loader_lib); ++ + if (screen->drm_fd != -1) + close(screen->drm_fd); + +-- +2.41.0 + diff --git a/mesa.spec b/mesa.spec index 4c1d8d0..ba4c67e 100644 --- a/mesa.spec +++ b/mesa.spec @@ -75,6 +75,7 @@ Source1: Mesa-MLAA-License-Clarification-Email.txt
Patch10: gnome-shell-glthread-disable.patch Patch11: 0001-nir-add-deref-follower-builder-for-casts.patch +Patch12: 0001-zink-Fix-crash-on-zink_create_screen-error-path.patch
BuildRequires: meson >= 1.2.0 BuildRequires: gcc
commit 933ae55743ba3c0bc0ec82fb63edfceaaf270f9a Author: José Expósito jexposit@redhat.com Date: Thu Nov 2 09:55:15 2023 +0100
Update to 23.3.0-rc2
Add a patch from upstream [1] fixing a compile error with LLVM 17 [2].
[1] https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25536 [2] https://gitlab.freedesktop.org/mesa/mesa/-/issues/9791
diff --git a/0001-nir-add-deref-follower-builder-for-casts.patch b/0001-nir-add-deref-follower-builder-for-casts.patch new file mode 100644 index 0000000..ae328d2 --- /dev/null +++ b/0001-nir-add-deref-follower-builder-for-casts.patch @@ -0,0 +1,77 @@ +From 6388896985da7495ad0968322491953894d29637 Mon Sep 17 00:00:00 2001 +From: Faith Ekstrand faith.ekstrand@collabora.com +Date: Wed, 1 Nov 2023 15:38:35 -0500 +Subject: [PATCH] nir: add deref follower builder for casts. + +This fixes intel_clc builds with llvm 17 on gfx125_bvh_build_DFS_DFS +where it dies in the lower indirect derefs pass. + +Co-authored-by: Dave Airlie airlied@redhat.com +Fixes: 4a4e1757381c ("nir: Support deref instructions in lower_var_copies") +Part-of: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25536 +--- + src/compiler/nir/nir_builder.h | 27 ++++++++++++++++++++++++--- + 1 file changed, 24 insertions(+), 3 deletions(-) + +diff --git a/src/compiler/nir/nir_builder.h b/src/compiler/nir/nir_builder.h +index c9f3465406c..d2b5702d3c9 100644 +--- a/src/compiler/nir/nir_builder.h ++++ b/src/compiler/nir/nir_builder.h +@@ -1483,9 +1483,12 @@ nir_build_deref_struct(nir_builder *build, nir_deref_instr *parent, + } + + static inline nir_deref_instr * +-nir_build_deref_cast(nir_builder *build, nir_def *parent, +- nir_variable_mode modes, const struct glsl_type *type, +- unsigned ptr_stride) ++nir_build_deref_cast_with_alignment(nir_builder *build, nir_def *parent, ++ nir_variable_mode modes, ++ const struct glsl_type *type, ++ unsigned ptr_stride, ++ unsigned align_mul, ++ unsigned align_offset) + { + nir_deref_instr *deref = + nir_deref_instr_create(build->shader, nir_deref_type_cast); +@@ -1493,6 +1496,8 @@ nir_build_deref_cast(nir_builder *build, nir_def *parent, + deref->modes = modes; + deref->type = type; + deref->parent = nir_src_for_ssa(parent); ++ deref->cast.align_mul = align_mul; ++ deref->cast.align_offset = align_offset; + deref->cast.ptr_stride = ptr_stride; + + nir_def_init(&deref->instr, &deref->def, parent->num_components, +@@ -1503,6 +1508,15 @@ nir_build_deref_cast(nir_builder *build, nir_def *parent, + return deref; + } + ++static inline nir_deref_instr * ++nir_build_deref_cast(nir_builder *build, nir_def *parent, ++ nir_variable_mode modes, const struct glsl_type *type, ++ unsigned ptr_stride) ++{ ++ return nir_build_deref_cast_with_alignment(build, parent, modes, type, ++ ptr_stride, 0, 0); ++} ++ + static inline nir_deref_instr * + nir_alignment_deref_cast(nir_builder *build, nir_deref_instr *parent, + uint32_t align_mul, uint32_t align_offset) +@@ -1570,6 +1584,13 @@ nir_build_deref_follower(nir_builder *b, nir_deref_instr *parent, + + return nir_build_deref_struct(b, parent, leader->strct.index); + ++ case nir_deref_type_cast: ++ return nir_build_deref_cast_with_alignment(b, &parent->def, ++ leader->modes, ++ leader->type, ++ leader->cast.ptr_stride, ++ leader->cast.align_mul, ++ leader->cast.align_offset); + default: + unreachable("Invalid deref instruction type"); + } +-- +2.41.0 + diff --git a/mesa.spec b/mesa.spec index eb07bad..4c1d8d0 100644 --- a/mesa.spec +++ b/mesa.spec @@ -61,7 +61,7 @@
Name: mesa Summary: Mesa graphics libraries -%global ver 23.3.0-rc1 +%global ver 23.3.0-rc2 Version: %{lua:ver = string.gsub(rpm.expand("%{ver}"), "-", "~"); print(ver)} Release: %autorelease License: MIT AND BSD-3-Clause AND SGI-B-2.0 @@ -74,6 +74,7 @@ Source0: https://archive.mesa3d.org/mesa-%%7Bver%7D.tar.xz Source1: Mesa-MLAA-License-Clarification-Email.txt
Patch10: gnome-shell-glthread-disable.patch +Patch11: 0001-nir-add-deref-follower-builder-for-casts.patch
BuildRequires: meson >= 1.2.0 BuildRequires: gcc @@ -591,6 +592,7 @@ popd %if 0%{?with_kmsro} %{_libdir}/dri/armada-drm_dri.so %{_libdir}/dri/exynos_dri.so +%{_libdir}/dri/hdlcd_dri.so %{_libdir}/dri/hx8357d_dri.so %{_libdir}/dri/ili9225_dri.so %{_libdir}/dri/ili9341_dri.so diff --git a/sources b/sources index 5e336b0..ca07f20 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (mesa-23.3.0-rc1.tar.xz) = 4eedec92dd59027801ed104cadaa3bc4d5ad5ca1073d6f173c31feeed5e528029c8ac417ee54ea69bc874847b7caf3fadd9d713f5b744d97d14a5ec6d0b8fce4 +SHA512 (mesa-23.3.0-rc2.tar.xz) = bebb27bcc860ef85b9f17001e00d83bdd4e6172c5ac7bdd3dd143814abe8e3b9443cea436db1df580834609f80ebdb46a01f3c66c141042a80f59434b5fd85aa
commit 52721672572f0d8ad6039246250bebb99cf1af04 Author: José Expósito jexposit@redhat.com Date: Thu Oct 26 11:03:05 2023 +0200
Update to 23.3.0-rc1
Remove patch added by commit d0377e3d3b8f ("Backport MR #24045 to fix Iris crashes (#2238711)") as it was fixed by upstream mesa commit 9590bce3e249 ("radeonsi: prefix function with si_ to prevent name collision"), which is included in 23.3.0-rc1:
$ git tag --contains=9590bce3e249 mesa-23.3.0-rc1
diff --git a/0001-radeonsi-prefix-function-with-si_-to-prevent-name-co.patch b/0001-radeonsi-prefix-function-with-si_-to-prevent-name-co.patch deleted file mode 100644 index 240d07d..0000000 --- a/0001-radeonsi-prefix-function-with-si_-to-prevent-name-co.patch +++ /dev/null @@ -1,75 +0,0 @@ -From 9590bce3e249a34665b2c42b20bfdbdc7f32147f Mon Sep 17 00:00:00 2001 -From: WinLinux1028 reimu@hakurei.win -Date: Tue, 11 Jul 2023 18:16:01 +0900 -Subject: [PATCH] radeonsi: prefix function with si_ to prevent name collision - -Fixed a build error caused by multiple gfx11_init_query symbols when building with iris and radeonsi specified in gallium-drivers. - -Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9238 -Part-of: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24045 ---- - src/gallium/drivers/radeonsi/gfx11_query.c | 4 ++-- - src/gallium/drivers/radeonsi/si_pipe.c | 4 ++-- - src/gallium/drivers/radeonsi/si_pipe.h | 4 ++-- - 3 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/src/gallium/drivers/radeonsi/gfx11_query.c b/src/gallium/drivers/radeonsi/gfx11_query.c -index bfcd8e25110..2a331cc3bda 100644 ---- a/src/gallium/drivers/radeonsi/gfx11_query.c -+++ b/src/gallium/drivers/radeonsi/gfx11_query.c -@@ -422,13 +422,13 @@ struct pipe_query *gfx11_sh_query_create(struct si_screen *screen, enum pipe_que - return (struct pipe_query *)query; - } - --void gfx11_init_query(struct si_context *sctx) -+void si_gfx11_init_query(struct si_context *sctx) - { - list_inithead(&sctx->shader_query_buffers); - sctx->atoms.s.shader_query.emit = emit_shader_query; - } - --void gfx11_destroy_query(struct si_context *sctx) -+void si_gfx11_destroy_query(struct si_context *sctx) - { - if (!sctx->shader_query_buffers.next) - return; -diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c -index fb5c02c473b..2b4fceb89b1 100644 ---- a/src/gallium/drivers/radeonsi/si_pipe.c -+++ b/src/gallium/drivers/radeonsi/si_pipe.c -@@ -192,7 +192,7 @@ static void si_destroy_context(struct pipe_context *context) - si_release_all_descriptors(sctx); - - if (sctx->gfx_level >= GFX10 && sctx->has_graphics) -- gfx11_destroy_query(sctx); -+ si_gfx11_destroy_query(sctx); - - if (sctx->sqtt) { - struct si_screen *sscreen = sctx->screen; -@@ -637,7 +637,7 @@ static struct pipe_context *si_create_context(struct pipe_screen *screen, unsign - /* Initialize graphics-only context functions. */ - if (sctx->has_graphics) { - if (sctx->gfx_level >= GFX10) -- gfx11_init_query(sctx); -+ si_gfx11_init_query(sctx); - si_init_msaa_functions(sctx); - si_init_shader_functions(sctx); - si_init_state_functions(sctx); -diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h -index 55f1d1788f1..389716854f9 100644 ---- a/src/gallium/drivers/radeonsi/si_pipe.h -+++ b/src/gallium/drivers/radeonsi/si_pipe.h -@@ -1616,8 +1616,8 @@ void *si_create_query_result_cs(struct si_context *sctx); - void *gfx11_create_sh_query_result_cs(struct si_context *sctx); - - /* gfx11_query.c */ --void gfx11_init_query(struct si_context *sctx); --void gfx11_destroy_query(struct si_context *sctx); -+void si_gfx11_init_query(struct si_context *sctx); -+void si_gfx11_destroy_query(struct si_context *sctx); - - /* si_test_image_copy_region.c */ - void si_test_image_copy_region(struct si_screen *sscreen); --- -2.41.0 - diff --git a/mesa.spec b/mesa.spec index f0d7f4c..eb07bad 100644 --- a/mesa.spec +++ b/mesa.spec @@ -61,7 +61,7 @@
Name: mesa Summary: Mesa graphics libraries -%global ver 23.2.1 +%global ver 23.3.0-rc1 Version: %{lua:ver = string.gsub(rpm.expand("%{ver}"), "-", "~"); print(ver)} Release: %autorelease License: MIT AND BSD-3-Clause AND SGI-B-2.0 @@ -73,12 +73,6 @@ Source0: https://archive.mesa3d.org/mesa-%%7Bver%7D.tar.xz # Fedora opts to ignore the optional part of clause 2 and treat that code as 2 clause BSD. Source1: Mesa-MLAA-License-Clarification-Email.txt
-# https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24045 -# https://bugzilla.redhat.com/show_bug.cgi?id=2238711 -# fixes a symbol name collision between iris and radeonsi drivers -# expected to fix the crashes reported in #2238711 -Patch0: 0001-radeonsi-prefix-function-with-si_-to-prevent-name-co.patch - Patch10: gnome-shell-glthread-disable.patch
BuildRequires: meson >= 1.2.0 diff --git a/sources b/sources index d92ac33..5e336b0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (mesa-23.2.1.tar.xz) = 927af0885a4815d330de384232deadf3dce7e2e2024738f138a344cbc4adce22888a9e335317f1d75965a5e691c9638949105f18c9b6ef43839fb594c6b474b5 +SHA512 (mesa-23.3.0-rc1.tar.xz) = 4eedec92dd59027801ed104cadaa3bc4d5ad5ca1073d6f173c31feeed5e528029c8ac417ee54ea69bc874847b7caf3fadd9d713f5b744d97d14a5ec6d0b8fce4
arch-excludes@lists.fedoraproject.org