From e348ee303f029e5795e39cfb42e7e312511bb6ef Mon Sep 17 00:00:00 2001 From: blazy_uwu Date: Fri, 3 Nov 2023 10:05:09 +0000 Subject: [PATCH] mesa: update to version 23.2.1, closes #170 --- extra/mesa/build | 4 +- extra/mesa/checksums | 3 +- .../cleanup_includes_modern_passmanager.patch | 168 ------------------ extra/mesa/sources | 3 +- extra/mesa/version | 2 +- 5 files changed, 4 insertions(+), 176 deletions(-) delete mode 100644 extra/mesa/patches/cleanup_includes_modern_passmanager.patch diff --git a/extra/mesa/build b/extra/mesa/build index 24f1519e..bf0d8c2c 100755 --- a/extra/mesa/build +++ b/extra/mesa/build @@ -2,8 +2,6 @@ export DESTDIR="$1" -patch -p1 < cleanup_includes_modern_passmanager.patch - # rust_std is not (yet?) supported by muon, and we should try # to avoid a hard rust dependency here if possible. sed "s/, 'rust_std=2021'//" meson.build > _ @@ -14,7 +12,7 @@ mv -f _ meson.build # and enables it if present. ie: install glvnd, rebuild mesa. pkg-config --exists libglvnd || glvnd_enabled=false -meson \ +meson setup \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ diff --git a/extra/mesa/checksums b/extra/mesa/checksums index d54504a6..93c12019 100644 --- a/extra/mesa/checksums +++ b/extra/mesa/checksums @@ -1,2 +1 @@ -549f20f86cc12c896fe3795e1bff521149f0699f030a86ec07e120f003fd212c33 -5626bc053d108106b0d0975b7bb856aaa7d088a93551c46f4f9c2ae0b2ba41b620 +971c167e9a8640b2f4921e1e60fa8644630dcceca9ba51e11b32bf32d7f8e049ff diff --git a/extra/mesa/patches/cleanup_includes_modern_passmanager.patch b/extra/mesa/patches/cleanup_includes_modern_passmanager.patch deleted file mode 100644 index 7f6b237b..00000000 --- a/extra/mesa/patches/cleanup_includes_modern_passmanager.patch +++ /dev/null @@ -1,168 +0,0 @@ -From 9ba416cdc67073cdda9a73fe9d37304b82bdd526 Mon Sep 17 00:00:00 2001 -From: Pierre-Eric Pelloux-Prayer -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 -Part-of: ---- - 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 24d082398e991..9e0d6a5f64392 100644 ---- a/src/gallium/auxiliary/gallivm/lp_bld_init.c -+++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c -@@ -42,14 +42,14 @@ - - #include - #include --#include --#if LLVM_VERSION_MAJOR >= 7 --#include --#endif - #include - #if GALLIVM_USE_NEW_PASS == 1 - #include - #elif GALLIVM_HAVE_CORO == 1 -+#include -+#if LLVM_VERSION_MAJOR >= 7 -+#include -+#endif - #if LLVM_VERSION_MAJOR <= 8 && (DETECT_ARCH_AARCH64 || DETECT_ARCH_ARM || DETECT_ARCH_S390 || DETECT_ARCH_MIPS64) - #include - #endif --- -GitLab - -From 2d4fe5f229791fde52846b3f583c12508b5109d6 Mon Sep 17 00:00:00 2001 -From: Dave Airlie -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 -Part-of: ---- - .../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 7a50fea332395..43d26fe1abbce 100644 ---- a/src/gallium/frontends/clover/llvm/invocation.cpp -+++ b/src/gallium/frontends/clover/llvm/invocation.cpp -@@ -27,13 +27,17 @@ - #include - #include - #include -+#include - #include --#include -+#include - #include - #ifdef HAVE_CLOVER_SPIRV - #include - #endif - -+#include -+#include -+#include - #include - #include - #include -@@ -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 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"; -+ level = LLVMCodeGenLevelNone; -+ break; -+ case 1: -+ opt_str = "default"; -+ level = LLVMCodeGenLevelLess; -+ break; -+ case 2: -+ opt_str = "default"; -+ level = LLVMCodeGenLevelDefault; -+ break; -+ case 3: -+ opt_str = "default"; -+ 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 -@@ -500,7 +538,7 @@ clover::llvm::link_program(const std::vector &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() + "-" + --- -GitLab - diff --git a/extra/mesa/sources b/extra/mesa/sources index ae6ef97e..a60d6bb9 100644 --- a/extra/mesa/sources +++ b/extra/mesa/sources @@ -1,2 +1 @@ -https://archive.mesa3d.org/mesa-23.1.9.tar.xz -patches/cleanup_includes_modern_passmanager.patch +https://archive.mesa3d.org/mesa-23.2.1.tar.xz diff --git a/extra/mesa/version b/extra/mesa/version index 8bf4ca8f..55490841 100644 --- a/extra/mesa/version +++ b/extra/mesa/version @@ -1 +1 @@ -23.1.9 2 +23.2.1 1