commit 6d66f55f152ce08cec9e8d5e3e08a1906d5e257f Author: Tim Biermann <tbier@posteo.de> Date: Thu Nov 30 10:09:04 2023 +0100 mesa: 23.2.1 -> 23.3.0 diff --git a/mesa/.signature b/mesa/.signature index 77db9b59..e9978c5a 100644 --- a/mesa/.signature +++ b/mesa/.signature @@ -1,6 +1,5 @@ untrusted comment: verify with /etc/ports/xorg.pub -RWTSGWF5Q7TndIWGtKtiYToK7kvnqEoAdxVGe8qR4PO8/KdVB3TRwYzppaipj+o6FEDSL6euO+H5n5Frs1T2HJQ8QEX3/PN/kwk= -SHA256 (Pkgfile) = 2b6e94b78b719af0c1c528278fd2aa3838de2f41db53f8b582a0bbae491541f0 +RWTSGWF5Q7TndO8mrMKT8cWoqeLtqjnqD4ZtO6cXNgw70DjPDcldf4of+LzE2X54F0X4mIwnj6SZIQuK0yB9fK4ZZBg2FhgiVgQ= +SHA256 (Pkgfile) = 5aa110996dda4de49f9a434b0c76ac9ac6eadd6ed049a1ddb5a9de74b6f8d78c SHA256 (.footprint) = 6924460d44cdb41ff53cb50c2c805ea5a8d2fa2b38127c474fa859b200f82f1c -SHA256 (mesa-23.2.1.tar.xz) = 64de0616fc2d801f929ab1ac2a4f16b3e2783c4309a724c8a259b20df8bbc1cc -SHA256 (U_clover-llvm-move-to-modern-pass-manager.patch) = 9174cd8a44d3841b2614e0386e212b0dfb56a6e26ea69c7c4415f77918d62f5d +SHA256 (mesa-23.3.0.tar.xz) = 50f729dd60ed6335b989095baad81ef5edf7cfdd4b4b48b9b955917cb07d69c5 diff --git a/mesa/Pkgfile b/mesa/Pkgfile index fe087b77..0c5bb79e 100644 --- a/mesa/Pkgfile +++ b/mesa/Pkgfile @@ -5,10 +5,9 @@ # Optional: directx-headers glslang libclc libunwind libva libvdpau lm_sensors rust-bindgen spirv-llvm-translator vulkan-loader wayland-protocols name=mesa -version=23.2.1 +version=23.3.0 release=1 -source=(https://archive.mesa3d.org/$name-$version.tar.xz - U_clover-llvm-move-to-modern-pass-manager.patch) +source=(https://archive.mesa3d.org/$name-$version.tar.xz) build() { prt-get isinst directx-headers && PKGMK_MESA_GALLIUM+='d3d12,' @@ -25,9 +24,6 @@ build() { #prt-get isinst xorg-libxdamage xorg-libxrandr xorg-libxshmfence xorg-libxvmc xorg-libxxf86vm && PKGMK_MESA_PLATFORMS+=',x11' PKGMK_MESA_PLATFORMS+=',x11' - # https://build.opensuse.org/package/show/openSUSE:Factory/Mesa - patch -Np1 -d $name-$version -i $SRC/U_clover-llvm-move-to-modern-pass-manager.patch - meson setup build $name-$version $PKGMK_MESA \ --prefix=/usr \ --sysconfdir=/etc \ diff --git a/mesa/U_clover-llvm-move-to-modern-pass-manager.patch b/mesa/U_clover-llvm-move-to-modern-pass-manager.patch deleted file mode 100644 index 7f33ad34..00000000 --- a/mesa/U_clover-llvm-move-to-modern-pass-manager.patch +++ /dev/null @@ -1,126 +0,0 @@ -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