summaryrefslogtreecommitdiff
path: root/media-libs/mesa
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-03-10 11:28:04 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-03-10 11:28:04 +0000
commitdb42a995a5cdeedb9c3613dae4c387c77e8400b0 (patch)
tree657e4bf733e1d241c61c8f72f629a57a711b0a1c /media-libs/mesa
parent1b8e6913dfe6a10d502758f2a6e66a7fa861ca52 (diff)
media-libs/mesa : revision bump, borrow LLVM 6 patches from frugalware :D
Diffstat (limited to 'media-libs/mesa')
-rw-r--r--media-libs/mesa/files/enableFastMath.patch43
-rw-r--r--media-libs/mesa/files/fixLlvm6apichange.patch33
-rw-r--r--media-libs/mesa/mesa-17.3.6-r2.ebuild (renamed from media-libs/mesa/mesa-17.3.6-r1.ebuild)4
3 files changed, 80 insertions, 0 deletions
diff --git a/media-libs/mesa/files/enableFastMath.patch b/media-libs/mesa/files/enableFastMath.patch
new file mode 100644
index 00000000..ab8a25a1
--- /dev/null
+++ b/media-libs/mesa/files/enableFastMath.patch
@@ -0,0 +1,43 @@
+From 5d61fa4e68b7eb6d481a37efdbb35fdce675a6ad Mon Sep 17 00:00:00 2001
+From: Tobias Droste <tdroste@gmx.de>
+Date: Wed, 8 Nov 2017 10:44:19 +0100
+Subject: gallivm: Use new LLVM fast-math-flags API
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+LLVM 6 changed the API on the fast-math-flags:
+https://reviews.llvm.org/rL317488
+
+NOTE: This also enables the new flag 'ApproxFunc' to allow for
+approximations for library functions (sin, cos, ...). I'm not completly
+convinced, that this is something mesa should do.
+
+Signed-off-by: Tobias Droste <tdroste@gmx.de>
+Reviewed-by: Marek Olšák <marek.olsak@amd.com>
+Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com>
+---
+ src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+(limited to 'src/gallium/auxiliary/gallivm/lp_bld_misc.cpp')
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
+index d988910..1319407 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
++++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
+@@ -830,7 +830,11 @@ lp_create_builder(LLVMContextRef ctx, enum lp_float_mode float_mode)
+ llvm::unwrap(builder)->setFastMathFlags(flags);
+ break;
+ case LP_FLOAT_MODE_UNSAFE_FP_MATH:
++#if HAVE_LLVM >= 0x0600
++ flags.setFast();
++#else
+ flags.setUnsafeAlgebra();
++#endif
+ llvm::unwrap(builder)->setFastMathFlags(flags);
+ break;
+ }
+--
+cgit v1.1
+
diff --git a/media-libs/mesa/files/fixLlvm6apichange.patch b/media-libs/mesa/files/fixLlvm6apichange.patch
new file mode 100644
index 00000000..fea356f3
--- /dev/null
+++ b/media-libs/mesa/files/fixLlvm6apichange.patch
@@ -0,0 +1,33 @@
+From ad218754c79e0af61d5ba225a4b195cb55c2cac9 Mon Sep 17 00:00:00 2001
+From: Tim Rowley <timothy.o.rowley@intel.com>
+Date: Tue, 2 Jan 2018 10:48:21 -0600
+Subject: swr/rast: fix MemoryBuffer build break for llvm-6
+
+LLVM api change.
+
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104381
+Tested-by: Laurent Carlier <lordheavym@gmail.com>
+Reviewed-By: Bruce Cherniak <bruce.cherniak@intel.com>
+---
+ src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp
+index 3f0772c..59672bb 100644
+--- a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp
++++ b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp
+@@ -498,7 +498,11 @@ std::unique_ptr<llvm::MemoryBuffer> JitCache::getObject(const llvm::Module* M)
+ break;
+ }
+
++#if LLVM_VERSION_MAJOR < 6
+ pBuf = llvm::MemoryBuffer::getNewUninitMemBuffer(size_t(header.GetBufferSize()));
++#else
++ pBuf = llvm::WritableMemoryBuffer::getNewUninitMemBuffer(size_t(header.GetBufferSize()));
++#endif
+ if (!fread(const_cast<char*>(pBuf->getBufferStart()), header.GetBufferSize(), 1, fpIn))
+ {
+ pBuf = nullptr;
+--
+cgit v1.1
+
diff --git a/media-libs/mesa/mesa-17.3.6-r1.ebuild b/media-libs/mesa/mesa-17.3.6-r2.ebuild
index 38f6acdc..f770b1f7 100644
--- a/media-libs/mesa/mesa-17.3.6-r1.ebuild
+++ b/media-libs/mesa/mesa-17.3.6-r2.ebuild
@@ -243,6 +243,9 @@ DEPEND="${RDEPEND}
$(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
"
+PATCHES=( "${FILESDIR}"/fixLlvm6apichange.patch
+ "${FILESDIR}"/enableFastMath.patch )
+
S="${WORKDIR}/${MY_P}"
EGIT_CHECKOUT_DIR=${S}
@@ -284,6 +287,7 @@ pkg_setup() {
}
src_prepare() {
+ default
[[ ${PV} == 9999 ]] && eautoreconf
eapply_user
}