commit c3e1c5e1ae12b00f54a22e3d968f043ea12dfe0a
Author: Thorsten Leemhuis <linux(a)leemhuis.info>
Date: Wed Oct 11 07:05:39 2023 +0200
follow Fedora: backport MR #24045 to fix Iris crashes (RHBZ#2238711)
temporarily hard require llvm16, as that's what's used by fedora
Signed-off-by: Thorsten Leemhuis <linux(a)leemhuis.info>
...efix-function-with-si_-to-prevent-name-co.patch | 75 ++++++++++++++++++++++
mesa-freeworld.spec | 15 ++++-
2 files changed, 88 insertions(+), 2 deletions(-)
---
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
new file mode 100644
index 0000000..240d07d
--- /dev/null
+++ b/0001-radeonsi-prefix-function-with-si_-to-prevent-name-co.patch
@@ -0,0 +1,75 @@
+From 9590bce3e249a34665b2c42b20bfdbdc7f32147f Mon Sep 17 00:00:00 2001
+From: WinLinux1028 <reimu(a)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-freeworld.spec b/mesa-freeworld.spec
index aa8be68..c9dfbff 100644
--- a/mesa-freeworld.spec
+++ b/mesa-freeworld.spec
@@ -66,7 +66,7 @@ Name: %{srcname}-freeworld
Summary: Mesa graphics libraries
%global ver 23.2.1
Version: %{lua:ver = string.gsub(rpm.expand("%{ver}"), "-",
"~"); print(ver)}
-Release: 1%{?dist}
+Release: 2%{?dist}
License: MIT
URL:
http://www.mesa3d.org
@@ -78,6 +78,11 @@ Source1: Mesa-MLAA-License-Clarification-Email.txt
Source2: org.mesa3d.vaapi.freeworld.metainfo.xml
Source3: org.mesa3d.vdpau.freeworld.metainfo.xml
+#
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
@@ -137,7 +142,9 @@ BuildRequires: pkgconfig(libomxil-bellagio)
%endif
BuildRequires: pkgconfig(libelf)
BuildRequires: pkgconfig(libglvnd) >= 1.3.2
-BuildRequires: llvm-devel >= 7.0.0
+# BuildRequires: llvm-devel >= 7.0.0
+# to match fedora's build temporarily require llvm16
+BuildRequires: %{_libdir}/llvm16/lib/libLLVM.so
%if 0%{?with_opencl}
BuildRequires: clang-devel
BuildRequires: bindgen
@@ -316,6 +323,10 @@ rm -fr %{buildroot}%{_libdir}/libVkLayer_MESA_device_select.so
%license docs/license.rst
%endif
%changelog
+* Tue Oct 10 2023 Thorsten Leemhuis <fedora(a)leemhuis.info> - 23.2.1-2
+- follow Fedora: backport MR #24045 to fix Iris crashes (RHBZ#2238711)
+- temporarily hard require llvm16, as that's what's used by fedora
+
* Sat Sep 30 2023 Thorsten Leemhuis <fedora(a)leemhuis.info> - 23.2.1-1
- Update to 23.2.1