Accepting request 1112897 from X11:XOrg
OBS-URL: https://build.opensuse.org/request/show/1112897 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/Mesa?expand=0&rev=486
This commit is contained in:
commit
6483028a3f
22
Mesa.changes
22
Mesa.changes
@ -1,3 +1,25 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Sep 21 15:13:11 UTC 2023 - Aaron Puchert <aaronpuchert@alice-dsl.net>
|
||||||
|
|
||||||
|
- Backport upstream patches for compatibility with LLVM 17:
|
||||||
|
* U_llvmpipe-only-include-old-Transform-includes-when-ne.patch
|
||||||
|
removes unneeded includes of header files that no longer exist.
|
||||||
|
* U_clover-llvm-move-to-modern-pass-manager.patch migrates Clover
|
||||||
|
to the new pass manager, since the old PM has been removed.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Sep 21 10:26:36 UTC 2023 - Stefan Dirsch <sndirsch@suse.com>
|
||||||
|
|
||||||
|
- disable nine on arm/aarch64 in the hope to fix build on this
|
||||||
|
platform; there is no need for Direct3D/Wine for arm/aarch64
|
||||||
|
anyway ...
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Sep 21 08:05:24 UTC 2023 - Stefan Dirsch <sndirsch@suse.com>
|
||||||
|
|
||||||
|
- Update to bugfix release 23.1.8:
|
||||||
|
--> https://docs.mesa3d.org/relnotes/23.1.8.html
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Sep 7 07:02:41 UTC 2023 - Stefan Dirsch <sndirsch@suse.com>
|
Thu Sep 7 07:02:41 UTC 2023 - Stefan Dirsch <sndirsch@suse.com>
|
||||||
|
|
||||||
|
11
Mesa.spec
11
Mesa.spec
@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
%define glamor 1
|
%define glamor 1
|
||||||
%define _name_archive mesa
|
%define _name_archive mesa
|
||||||
%define _version 23.1.7
|
%define _version 23.1.8
|
||||||
%define with_opencl 0
|
%define with_opencl 0
|
||||||
%define with_rusticl 0
|
%define with_rusticl 0
|
||||||
%define with_vulkan 0
|
%define with_vulkan 0
|
||||||
@ -64,7 +64,7 @@
|
|||||||
%define vdpau_virtio_gpu 1
|
%define vdpau_virtio_gpu 1
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%ifarch %{ix86} x86_64 %{arm} aarch64
|
%ifarch %{ix86} x86_64
|
||||||
%define with_nine 1
|
%define with_nine 1
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -123,7 +123,7 @@
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
Name: Mesa%{psuffix}
|
Name: Mesa%{psuffix}
|
||||||
Version: 23.1.7
|
Version: 23.1.8
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: System for rendering 3-D graphics
|
Summary: System for rendering 3-D graphics
|
||||||
License: MIT
|
License: MIT
|
||||||
@ -138,6 +138,9 @@ Source4: manual-pages.tar.bz2
|
|||||||
Source6: Mesa-rpmlintrc
|
Source6: Mesa-rpmlintrc
|
||||||
Source7: Mesa.keyring
|
Source7: Mesa.keyring
|
||||||
Patch2: n_add-Mesa-headers-again.patch
|
Patch2: n_add-Mesa-headers-again.patch
|
||||||
|
# Patches for LLVM 17, should all be in 23.2.
|
||||||
|
Patch3: U_llvmpipe-only-include-old-Transform-includes-when-ne.patch
|
||||||
|
Patch4: U_clover-llvm-move-to-modern-pass-manager.patch
|
||||||
# never to be upstreamed
|
# never to be upstreamed
|
||||||
Patch54: n_drirc-disable-rgb10-for-chromium-on-amd.patch
|
Patch54: n_drirc-disable-rgb10-for-chromium-on-amd.patch
|
||||||
Patch58: u_dep_xcb.patch
|
Patch58: u_dep_xcb.patch
|
||||||
@ -770,6 +773,8 @@ programs against the XA state tracker.
|
|||||||
rm -rf docs/README.{VMS,WIN32,OS2}
|
rm -rf docs/README.{VMS,WIN32,OS2}
|
||||||
|
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
|
%patch3 -p1
|
||||||
|
%patch4 -p1
|
||||||
# no longer needed since gstreamer-plugins-vaapi 1.18.4
|
# no longer needed since gstreamer-plugins-vaapi 1.18.4
|
||||||
%if 0%{?suse_version} < 1550
|
%if 0%{?suse_version} < 1550
|
||||||
%patch54 -p1
|
%patch54 -p1
|
||||||
|
127
U_clover-llvm-move-to-modern-pass-manager.patch
Normal file
127
U_clover-llvm-move-to-modern-pass-manager.patch
Normal file
@ -0,0 +1,127 @@
|
|||||||
|
From 2d4fe5f229791fde52846b3f583c12508b5109d6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Dave Airlie <airlied@redhat.com>
|
||||||
|
Date: Fri, 25 Aug 2023 12:43:44 +1000
|
||||||
|
Subject: [PATCH] clover/llvm: move to modern pass manager.
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
This seems like it should work, but I haven't tested it yet.
|
||||||
|
|
||||||
|
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
|
||||||
|
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24879>
|
||||||
|
---
|
||||||
|
.../frontends/clover/llvm/invocation.cpp | 64 +++++++++++++++----
|
||||||
|
1 file changed, 51 insertions(+), 13 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/gallium/frontends/clover/llvm/invocation.cpp b/src/gallium/frontends/clover/llvm/invocation.cpp
|
||||||
|
index 7a50fea3323..43d26fe1abb 100644
|
||||||
|
--- a/src/gallium/frontends/clover/llvm/invocation.cpp
|
||||||
|
+++ b/src/gallium/frontends/clover/llvm/invocation.cpp
|
||||||
|
@@ -27,13 +27,17 @@
|
||||||
|
#include <llvm/IR/DiagnosticPrinter.h>
|
||||||
|
#include <llvm/IR/DiagnosticInfo.h>
|
||||||
|
#include <llvm/IR/LLVMContext.h>
|
||||||
|
+#include <llvm/IR/Module.h>
|
||||||
|
#include <llvm/Support/raw_ostream.h>
|
||||||
|
-#include <llvm/Transforms/IPO/PassManagerBuilder.h>
|
||||||
|
+#include <llvm/Transforms/IPO/Internalize.h>
|
||||||
|
#include <llvm-c/Target.h>
|
||||||
|
#ifdef HAVE_CLOVER_SPIRV
|
||||||
|
#include <LLVMSPIRVLib/LLVMSPIRVLib.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#include <llvm-c/TargetMachine.h>
|
||||||
|
+#include <llvm-c/Transforms/PassBuilder.h>
|
||||||
|
+#include <llvm/Support/CBindingWrapping.h>
|
||||||
|
#include <clang/CodeGen/CodeGenAction.h>
|
||||||
|
#include <clang/Lex/PreprocessorOptions.h>
|
||||||
|
#include <clang/Frontend/TextDiagnosticBuffer.h>
|
||||||
|
@@ -439,10 +443,10 @@ clover::llvm::compile_program(const std::string &source,
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
void
|
||||||
|
- optimize(Module &mod, unsigned optimization_level,
|
||||||
|
+ optimize(Module &mod,
|
||||||
|
+ const std::string& ir_target,
|
||||||
|
+ unsigned optimization_level,
|
||||||
|
bool internalize_symbols) {
|
||||||
|
- ::llvm::legacy::PassManager pm;
|
||||||
|
-
|
||||||
|
// By default, the function internalizer pass will look for a function
|
||||||
|
// called "main" and then mark all other functions as internal. Marking
|
||||||
|
// functions as internal enables the optimizer to perform optimizations
|
||||||
|
@@ -458,19 +462,53 @@ namespace {
|
||||||
|
if (internalize_symbols) {
|
||||||
|
std::vector<std::string> names =
|
||||||
|
map(std::mem_fn(&Function::getName), get_kernels(mod));
|
||||||
|
- pm.add(::llvm::createInternalizePass(
|
||||||
|
+ internalizeModule(mod,
|
||||||
|
[=](const ::llvm::GlobalValue &gv) {
|
||||||
|
return std::find(names.begin(), names.end(),
|
||||||
|
gv.getName()) != names.end();
|
||||||
|
- }));
|
||||||
|
+ });
|
||||||
|
}
|
||||||
|
|
||||||
|
- ::llvm::PassManagerBuilder pmb;
|
||||||
|
- pmb.OptLevel = optimization_level;
|
||||||
|
- pmb.LibraryInfo = new ::llvm::TargetLibraryInfoImpl(
|
||||||
|
- ::llvm::Triple(mod.getTargetTriple()));
|
||||||
|
- pmb.populateModulePassManager(pm);
|
||||||
|
- pm.run(mod);
|
||||||
|
+
|
||||||
|
+ const char *opt_str = NULL;
|
||||||
|
+ LLVMCodeGenOptLevel level;
|
||||||
|
+ switch (optimization_level) {
|
||||||
|
+ case 0:
|
||||||
|
+ default:
|
||||||
|
+ opt_str = "default<O0>";
|
||||||
|
+ level = LLVMCodeGenLevelNone;
|
||||||
|
+ break;
|
||||||
|
+ case 1:
|
||||||
|
+ opt_str = "default<O1>";
|
||||||
|
+ level = LLVMCodeGenLevelLess;
|
||||||
|
+ break;
|
||||||
|
+ case 2:
|
||||||
|
+ opt_str = "default<O2>";
|
||||||
|
+ level = LLVMCodeGenLevelDefault;
|
||||||
|
+ break;
|
||||||
|
+ case 3:
|
||||||
|
+ opt_str = "default<O3>";
|
||||||
|
+ level = LLVMCodeGenLevelAggressive;
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ const target &target = ir_target;
|
||||||
|
+ LLVMTargetRef targ;
|
||||||
|
+ char *err_message;
|
||||||
|
+
|
||||||
|
+ if (LLVMGetTargetFromTriple(target.triple.c_str(), &targ, &err_message))
|
||||||
|
+ return;
|
||||||
|
+ LLVMTargetMachineRef tm =
|
||||||
|
+ LLVMCreateTargetMachine(targ, target.triple.c_str(),
|
||||||
|
+ target.cpu.c_str(), "", level,
|
||||||
|
+ LLVMRelocDefault, LLVMCodeModelDefault);
|
||||||
|
+
|
||||||
|
+ if (!tm)
|
||||||
|
+ return;
|
||||||
|
+ LLVMPassBuilderOptionsRef opts = LLVMCreatePassBuilderOptions();
|
||||||
|
+ LLVMRunPasses(wrap(&mod), opt_str, tm, opts);
|
||||||
|
+
|
||||||
|
+ LLVMDisposeTargetMachine(tm);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::unique_ptr<Module>
|
||||||
|
@@ -500,7 +538,7 @@ clover::llvm::link_program(const std::vector<binary> &binaries,
|
||||||
|
auto c = create_compiler_instance(dev, dev.ir_target(), options, r_log);
|
||||||
|
auto mod = link(*ctx, *c, binaries, r_log);
|
||||||
|
|
||||||
|
- optimize(*mod, c->getCodeGenOpts().OptimizationLevel, !create_library);
|
||||||
|
+ optimize(*mod, dev.ir_target(), c->getCodeGenOpts().OptimizationLevel, !create_library);
|
||||||
|
|
||||||
|
static std::atomic_uint seq(0);
|
||||||
|
const std::string id = "." + mod->getModuleIdentifier() + "-" +
|
||||||
|
--
|
||||||
|
2.42.0
|
||||||
|
|
41
U_llvmpipe-only-include-old-Transform-includes-when-ne.patch
Normal file
41
U_llvmpipe-only-include-old-Transform-includes-when-ne.patch
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
From 9ba416cdc67073cdda9a73fe9d37304b82bdd526 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
|
||||||
|
Date: Fri, 12 May 2023 09:58:26 +0200
|
||||||
|
Subject: [PATCH] llvmpipe: only include old Transform includes when needed
|
||||||
|
|
||||||
|
This fixes building with recent LLVM where these 2 .h files
|
||||||
|
were removed.
|
||||||
|
|
||||||
|
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8671
|
||||||
|
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
|
||||||
|
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22980>
|
||||||
|
---
|
||||||
|
src/gallium/auxiliary/gallivm/lp_bld_init.c | 8 ++++----
|
||||||
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c
|
||||||
|
index 24d082398e9..9e0d6a5f643 100644
|
||||||
|
--- a/src/gallium/auxiliary/gallivm/lp_bld_init.c
|
||||||
|
+++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c
|
||||||
|
@@ -42,14 +42,14 @@
|
||||||
|
|
||||||
|
#include <llvm/Config/llvm-config.h>
|
||||||
|
#include <llvm-c/Analysis.h>
|
||||||
|
-#include <llvm-c/Transforms/Scalar.h>
|
||||||
|
-#if LLVM_VERSION_MAJOR >= 7
|
||||||
|
-#include <llvm-c/Transforms/Utils.h>
|
||||||
|
-#endif
|
||||||
|
#include <llvm-c/BitWriter.h>
|
||||||
|
#if GALLIVM_USE_NEW_PASS == 1
|
||||||
|
#include <llvm-c/Transforms/PassBuilder.h>
|
||||||
|
#elif GALLIVM_HAVE_CORO == 1
|
||||||
|
+#include <llvm-c/Transforms/Scalar.h>
|
||||||
|
+#if LLVM_VERSION_MAJOR >= 7
|
||||||
|
+#include <llvm-c/Transforms/Utils.h>
|
||||||
|
+#endif
|
||||||
|
#if LLVM_VERSION_MAJOR <= 8 && (DETECT_ARCH_AARCH64 || DETECT_ARCH_ARM || DETECT_ARCH_S390 || DETECT_ARCH_MIPS64)
|
||||||
|
#include <llvm-c/Transforms/IPO.h>
|
||||||
|
#endif
|
||||||
|
--
|
||||||
|
2.42.0
|
||||||
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:409641eadf0ed1c7794797a6f5a0b0195b5580b282166e5ec5629c6bcda6acd3
|
|
||||||
size 18544916
|
|
Binary file not shown.
3
mesa-23.1.8.tar.xz
Normal file
3
mesa-23.1.8.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:45434ff91a709844130a3174d9c0ef39c6b50725b2bb0c13e736f36134db14ad
|
||||||
|
size 18566724
|
BIN
mesa-23.1.8.tar.xz.sig
Normal file
BIN
mesa-23.1.8.tar.xz.sig
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user