From 7babb9da1c90d630ede0a6b7f602bd65e6d63d0c80a1d0db387417e12faefd4d Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Wed, 20 Mar 2024 13:15:31 +0000 Subject: [PATCH] Accepting request 1159766 from home:Guillaume_G:branches:X11:XOrg - Add patch to fix boo#1221664: * mesa-fix-llvm18.patch OBS-URL: https://build.opensuse.org/request/show/1159766 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/Mesa?expand=0&rev=1275 --- Mesa.changes | 6 ++++++ Mesa.spec | 5 ++++- mesa-fix-llvm18.patch | 47 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 mesa-fix-llvm18.patch diff --git a/Mesa.changes b/Mesa.changes index cb5edb2..aaf9714 100644 --- a/Mesa.changes +++ b/Mesa.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Mar 20 07:18:13 UTC 2024 - Guillaume GARDET + +- Add patch to fix boo#1221664: + * mesa-fix-llvm18.patch + ------------------------------------------------------------------- Tue Mar 19 12:59:16 UTC 2024 - Stefan Dirsch diff --git a/Mesa.spec b/Mesa.spec index 5a32bc5..5277250 100644 --- a/Mesa.spec +++ b/Mesa.spec @@ -1,5 +1,5 @@ # -# spec file +# spec file for package Mesa # # Copyright (c) 2024 SUSE LLC # @@ -142,6 +142,8 @@ Patch11: u_0001-intel-genxml-Drop-from-__future__-import-annotations.patc Patch12: u_0002-intel-genxml-Add-a-untyped-OrderedDict-fallback-for-.patch Patch13: python36-buildfix1.patch Patch14: python36-buildfix2.patch +# PATCH-FIX-UPSTREAM - boo#1221664 +Patch15: mesa-fix-llvm18.patch # never to be upstreamed Patch54: n_drirc-disable-rgb10-for-chromium-on-amd.patch Patch58: u_dep_xcb.patch @@ -771,6 +773,7 @@ rm -rf docs/README.{VMS,WIN32,OS2} %if 0%{?suse_version} < 1550 %patch -P 14 -p1 %endif +%patch -P 15 -p1 # no longer needed since gstreamer-plugins-vaapi 1.18.4 %if 0%{?suse_version} < 1550 %patch -P 54 -p1 diff --git a/mesa-fix-llvm18.patch b/mesa-fix-llvm18.patch new file mode 100644 index 0000000..839f2f0 --- /dev/null +++ b/mesa-fix-llvm18.patch @@ -0,0 +1,47 @@ +From 99f0449987bec1f82cd42a06f40bb4a863a37792 Mon Sep 17 00:00:00 2001 +From: Nikita Popov +Date: Mon, 11 Mar 2024 14:45:41 +0100 +Subject: [PATCH] Pass no-verify-fixpoint option to instcombine in LLVM 18 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +When LLVM 18 is used, pass the no-verify-fixpoint option when +running the instcombine pass. Otherwise LLVM may abort with an +error. + +The background here is that this option is enabled by default for +testing purposes, because instcombine is normally only explicitly +invoked like this inside tests. If it is used in an actual +production pipeline, the no-verify-fixpoint option needs to be +enabled. + +This should fix the issue reported at +https://bugzilla.redhat.com/show_bug.cgi?id=2268800. + +Reviewed-by: Konstantin Seurer +Reviewed-by: Marek Olšák +Part-of: +--- + src/gallium/auxiliary/gallivm/lp_bld_init.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c +index cd2108f3a088d..1345d85b22439 100644 +--- a/src/gallium/auxiliary/gallivm/lp_bld_init.c ++++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c +@@ -609,7 +609,11 @@ gallivm_compile_module(struct gallivm_state *gallivm) + LLVMRunPasses(gallivm->module, passes, LLVMGetExecutionEngineTargetMachine(gallivm->engine), opts); + + if (!(gallivm_perf & GALLIVM_PERF_NO_OPT)) ++#if LLVM_VERSION_MAJOR >= 18 ++ strcpy(passes, "sroa,early-cse,simplifycfg,reassociate,mem2reg,instsimplify,instcombine"); ++#else + strcpy(passes, "sroa,early-cse,simplifycfg,reassociate,mem2reg,instsimplify,instcombine"); ++#endif + else + strcpy(passes, "mem2reg"); + +-- +GitLab +