Compare commits
No commits in common. "c8" and "c8s" have entirely different histories.
|
@ -1,3 +1 @@
|
||||||
SOURCES/dataclasses-0.8.tar.gz
|
SOURCES/mesa-22.3.0.tar.xz
|
||||||
SOURCES/mesa-23.1.4.tar.xz
|
|
||||||
SOURCES/meson-0.61.4.tar.gz
|
|
||||||
|
|
|
@ -1,3 +1 @@
|
||||||
ef25d3e9e2523805baa314a4adcb915ae901740e SOURCES/dataclasses-0.8.tar.gz
|
331db7d4590f10c99b79e801bb40fa6de491d572 SOURCES/mesa-22.3.0.tar.xz
|
||||||
8a48c0e1fbda2c9563ddcf95b05012ab00a8a692 SOURCES/mesa-23.1.4.tar.xz
|
|
||||||
b0ab169abd8ec87ce773a02b2c7d6a8664b8db00 SOURCES/meson-0.61.4.tar.gz
|
|
||||||
|
|
|
@ -1,127 +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
|
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
From 808c054a42fd24a1aaefaeb1d95195fea9fb6e84 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Dave Airlie <airlied@redhat.com>
|
||||||
|
Date: Wed, 7 Dec 2022 05:11:47 +1000
|
||||||
|
Subject: [PATCH] glx: fix xshm check to init xshm_opcode.
|
||||||
|
|
||||||
|
Found and proposed by Ray Strode (halfline)
|
||||||
|
|
||||||
|
Fixes: 68e89401140d ("glx/drisw: use xcb instead of X to query connection")
|
||||||
|
---
|
||||||
|
src/glx/drisw_glx.c | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c
|
||||||
|
index c0d1e85fdc4..d7658eaf7c1 100644
|
||||||
|
--- a/src/glx/drisw_glx.c
|
||||||
|
+++ b/src/glx/drisw_glx.c
|
||||||
|
@@ -874,6 +874,7 @@ check_xshm(Display *dpy)
|
||||||
|
|
||||||
|
shm_cookie = xcb_query_extension(c, 7, "MIT-SHM");
|
||||||
|
shm_reply = xcb_query_extension_reply(c, shm_cookie, NULL);
|
||||||
|
+ xshm_opcode = shm_reply->major_opcode;
|
||||||
|
|
||||||
|
has_mit_shm = shm_reply->present;
|
||||||
|
free(shm_reply);
|
||||||
|
--
|
||||||
|
2.38.1
|
||||||
|
|
|
@ -1,41 +0,0 @@
|
||||||
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,4 +1,4 @@
|
||||||
VERSION ?= 23.1.4
|
VERSION ?= 22.3.0
|
||||||
SANITIZE ?= 1
|
SANITIZE ?= 1
|
||||||
|
|
||||||
DIRNAME = mesa-${VERSION}
|
DIRNAME = mesa-${VERSION}
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
diff -up mesa-23.1.4/meson.build.dma mesa-23.1.4/meson.build
|
|
||||||
--- mesa-23.1.4/meson.build.dma 2023-07-28 10:15:41.807945483 +1000
|
|
||||||
+++ mesa-23.1.4/meson.build 2023-07-28 10:15:46.465030794 +1000
|
|
||||||
@@ -835,7 +835,7 @@ if get_option('allow-kcmp') \
|
|
||||||
pre_args += '-DALLOW_KCMP'
|
|
||||||
endif
|
|
||||||
|
|
||||||
-prog_python = import('python').find_installation('python3')
|
|
||||||
+prog_python = import('python').find_installation('python3.6')
|
|
||||||
has_mako = run_command(
|
|
||||||
prog_python, '-c',
|
|
||||||
'''
|
|
|
@ -37,7 +37,7 @@
|
||||||
|
|
||||||
Name: mesa
|
Name: mesa
|
||||||
Summary: Mesa graphics libraries
|
Summary: Mesa graphics libraries
|
||||||
Version: 23.1.4
|
Version: 22.3.0
|
||||||
Release: 2%{?rctag:.%{rctag}}%{?dist}
|
Release: 2%{?rctag:.%{rctag}}%{?dist}
|
||||||
|
|
||||||
License: MIT
|
License: MIT
|
||||||
|
@ -52,24 +52,16 @@ Source3: Makefile
|
||||||
# Fedora opts to ignore the optional part of clause 2 and treat that code as 2 clause BSD.
|
# Fedora opts to ignore the optional part of clause 2 and treat that code as 2 clause BSD.
|
||||||
Source4: Mesa-MLAA-License-Clarification-Email.txt
|
Source4: Mesa-MLAA-License-Clarification-Email.txt
|
||||||
|
|
||||||
# build our own newer meson
|
|
||||||
Source5: meson-0.61.4.tar.gz
|
|
||||||
Source6: dataclasses-0.8.tar.gz
|
|
||||||
|
|
||||||
Patch0: lavapipe-disable-env-var.patch
|
Patch0: lavapipe-disable-env-var.patch
|
||||||
|
|
||||||
Patch1: fix-py-ver.patch
|
|
||||||
Patch10: gnome-shell-glthread-disable.patch
|
Patch10: gnome-shell-glthread-disable.patch
|
||||||
|
Patch11: 0001-glx-fix-xshm-check-to-init-xshm_opcode.patch
|
||||||
Patch12: radeonsi-turn-off-glthread.patch
|
Patch12: radeonsi-turn-off-glthread.patch
|
||||||
|
|
||||||
# Required to build against LLVM 17
|
|
||||||
Patch13: 0001-llvmpipe-only-include-old-Transform-includes-when-ne.patch
|
|
||||||
Patch14: 0001-clover-llvm-move-to-modern-pass-manager.patch
|
|
||||||
|
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
|
|
||||||
BuildRequires: meson
|
BuildRequires: meson >= 0.45
|
||||||
%if %{with_hardware}
|
%if %{with_hardware}
|
||||||
BuildRequires: kernel-headers
|
BuildRequires: kernel-headers
|
||||||
%endif
|
%endif
|
||||||
|
@ -323,27 +315,15 @@ Headers for development with the Vulkan API.
|
||||||
|
|
||||||
cp %{SOURCE4} docs/
|
cp %{SOURCE4} docs/
|
||||||
|
|
||||||
tar -xvf %{SOURCE5}
|
|
||||||
tar -xvf %{SOURCE6}
|
|
||||||
|
|
||||||
pathfix.py -i %{__python3} -pn bin/*.py src/egl/generate/*.py \
|
pathfix.py -i %{__python3} -pn bin/*.py src/egl/generate/*.py \
|
||||||
src/gallium/tools/trace/*.py \
|
src/gallium/tools/trace/*.py \
|
||||||
src/compiler/glsl/tests/*.py \
|
src/compiler/glsl/tests/*.py \
|
||||||
src/compiler/glsl/glcpp/tests/*.py
|
src/compiler/glsl/glcpp/tests/*.py
|
||||||
|
|
||||||
%build
|
%build
|
||||||
cd meson-0.61.4
|
|
||||||
%py3_build
|
|
||||||
%py3_install
|
|
||||||
cd -
|
|
||||||
cd dataclasses-0.8
|
|
||||||
%py3_build
|
|
||||||
%py3_install
|
|
||||||
cd -
|
|
||||||
export ASFLAGS="--generate-missing-build-notes=yes"
|
export ASFLAGS="--generate-missing-build-notes=yes"
|
||||||
%global __meson %{buildroot}/usr/bin/meson
|
%meson -Dcpp_std=gnu++14 \
|
||||||
export PYTHONPATH=/usr/lib/python3.6/site-packages/:%{buildroot}/usr/lib/python3.6/site-packages/
|
|
||||||
%meson -Dcpp_std=gnu++17 \
|
|
||||||
-Db_ndebug=true \
|
-Db_ndebug=true \
|
||||||
-Dplatforms=x11,wayland \
|
-Dplatforms=x11,wayland \
|
||||||
-Ddri3=enabled \
|
-Ddri3=enabled \
|
||||||
|
@ -375,25 +355,12 @@ export PYTHONPATH=/usr/lib/python3.6/site-packages/:%{buildroot}/usr/lib/python3
|
||||||
-Dvalgrind=%{?with_valgrind:true}%{!?with_valgrind:false} \
|
-Dvalgrind=%{?with_valgrind:true}%{!?with_valgrind:false} \
|
||||||
-Dbuild-tests=false \
|
-Dbuild-tests=false \
|
||||||
-Dselinux=true \
|
-Dselinux=true \
|
||||||
-Dlibunwind=disabled \
|
|
||||||
-Dlmsensors=disabled \
|
|
||||||
-Dandroid-libbacktrace=disabled \
|
|
||||||
%{nil}
|
%{nil}
|
||||||
%meson_build
|
%meson_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
cd meson-0.61.4
|
|
||||||
%py3_install
|
|
||||||
cd -
|
|
||||||
export PYTHONPATH=%{buildroot}/usr/lib/python3.6/site-packages/
|
|
||||||
%meson_install
|
%meson_install
|
||||||
|
|
||||||
#nuke the meson install bits
|
|
||||||
rm -rf %{buildroot}/usr/lib/python3.6/
|
|
||||||
rm -f %{buildroot}/usr/bin/meson
|
|
||||||
rm -rf %{buildroot}/usr/share/man/
|
|
||||||
rm -f %{buildroot}/usr/share/polkit-1/actions/com.mesonbuild.install.policy
|
|
||||||
|
|
||||||
# libvdpau opens the versioned name, don't bother including the unversioned
|
# libvdpau opens the versioned name, don't bother including the unversioned
|
||||||
rm -vf %{buildroot}%{_libdir}/vdpau/*.so
|
rm -vf %{buildroot}%{_libdir}/vdpau/*.so
|
||||||
# likewise glvnd
|
# likewise glvnd
|
||||||
|
@ -587,15 +554,6 @@ done
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Thu Nov 23 2023 José Expósito <jexposit@redhat.com> - 23.1.4-2
|
|
||||||
- Rebuild against LLVM 17
|
|
||||||
|
|
||||||
* Thu Jul 27 2023 Dave Airlie <airlied@redhat.com> - 23.1.4-1
|
|
||||||
- Update to 23.1.4
|
|
||||||
|
|
||||||
* Mon May 22 2023 Dave Airlie <airlied@redhat.com> - 23.1.0-1
|
|
||||||
- Update to 23.1.0
|
|
||||||
|
|
||||||
* Fri Jan 27 2023 Dave Airlie <airlied@redhat.com> - 22.3.0-2
|
* Fri Jan 27 2023 Dave Airlie <airlied@redhat.com> - 22.3.0-2
|
||||||
- disable glthread for radeonsi (breaks totem)
|
- disable glthread for radeonsi (breaks totem)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue