summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/mesa/files/0001-ac-fix-build-after-LLVM-5.0-SVN-r300718.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2017-07-29 00:42:49 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-07-31 15:13:32 +0100
commit6f12ac612ca29adc2f2a40526a757adfee92fb12 (patch)
tree3bb923d150fbb74cfbad6690d708ff18c2c43e4b /meta/recipes-graphics/mesa/files/0001-ac-fix-build-after-LLVM-5.0-SVN-r300718.patch
parent5c77067ee9c18e056515a5e83e7282b0035dfb49 (diff)
downloadpoky-6f12ac612ca29adc2f2a40526a757adfee92fb12.tar.gz
mesa: Fix build when building with llvmpipe
Add following in mesa.inc to enable llvmpipe PACKAGECONFIG_append_x86 = " gallium-llvm gallium r600" PACKAGECONFIG_append_x86-64 = " gallium-llvm gallium r600" This would enable llvmpipe for swrast, to check run this root@qemux86:~# glxinfo | grep llvm Device: llvmpipe (LLVM 5.0, 128 bits) (0xffffffff) OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 5.0, 128 bits) Backport patches to support llvm 5.0.0+ Add a patch to understand llvm version when llvm is build from git/svn (From OE-Core rev: da29bc17e4dd748f50b054c5e3afaf8d41bf4077) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics/mesa/files/0001-ac-fix-build-after-LLVM-5.0-SVN-r300718.patch')
-rw-r--r--meta/recipes-graphics/mesa/files/0001-ac-fix-build-after-LLVM-5.0-SVN-r300718.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/meta/recipes-graphics/mesa/files/0001-ac-fix-build-after-LLVM-5.0-SVN-r300718.patch b/meta/recipes-graphics/mesa/files/0001-ac-fix-build-after-LLVM-5.0-SVN-r300718.patch
new file mode 100644
index 0000000000..b27a3bc8e4
--- /dev/null
+++ b/meta/recipes-graphics/mesa/files/0001-ac-fix-build-after-LLVM-5.0-SVN-r300718.patch
@@ -0,0 +1,40 @@
1From 9861437e58fdd0de01193a102608d34e5952953f Mon Sep 17 00:00:00 2001
2From: Christoph Haag <haagch+mesadev@frickel.club>
3Date: Thu, 20 Apr 2017 10:34:18 +0200
4Subject: [PATCH 1/2] ac: fix build after LLVM 5.0 SVN r300718
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9v2: previously getWithDereferenceableBytes() exists, but addAttr() doesn't take that type
10
11Signed-off-by: Christoph Haag <haagch+mesadev@frickel.club>
12Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
13Tested-and-reviewed-by: Mike Lothian <mike@fireburn.co.uk>
14---
15Upstream-Status: Backport
16
17 src/amd/common/ac_llvm_helper.cpp | 4 ++++
18 1 file changed, 4 insertions(+)
19
20diff --git a/src/amd/common/ac_llvm_helper.cpp b/src/amd/common/ac_llvm_helper.cpp
21index d9ea4b1..11fa809 100644
22--- a/src/amd/common/ac_llvm_helper.cpp
23+++ b/src/amd/common/ac_llvm_helper.cpp
24@@ -44,9 +44,13 @@ typedef AttributeSet AttributeList;
25 void ac_add_attr_dereferenceable(LLVMValueRef val, uint64_t bytes)
26 {
27 llvm::Argument *A = llvm::unwrap<llvm::Argument>(val);
28+#if HAVE_LLVM < 0x0500
29 llvm::AttrBuilder B;
30 B.addDereferenceableAttr(bytes);
31 A->addAttr(llvm::AttributeList::get(A->getContext(), A->getArgNo() + 1, B));
32+#else
33+ A->addAttr(llvm::Attribute::getWithDereferenceableBytes(A->getContext(), bytes));
34+#endif
35 }
36
37 bool ac_is_sgpr_param(LLVMValueRef arg)
38--
392.13.3
40