diff options
author | Khem Raj <raj.khem@gmail.com> | 2017-07-29 00:42:49 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-07-31 14:25:44 +0100 |
commit | da29bc17e4dd748f50b054c5e3afaf8d41bf4077 (patch) | |
tree | f9d7a4bf464dc1896b35563d5169d63f8ddefa8f /meta/recipes-graphics/mesa/files/0001-ac-fix-build-after-LLVM-5.0-SVN-r300718.patch | |
parent | 8724ef9c53e7804ead9ba0f019369b0e4daada63 (diff) | |
download | openembedded-core-contrib-da29bc17e4dd748f50b054c5e3afaf8d41bf4077.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
Signed-off-by: Khem Raj <raj.khem@gmail.com>
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.patch | 40 |
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 @@ +From 9861437e58fdd0de01193a102608d34e5952953f Mon Sep 17 00:00:00 2001 +From: Christoph Haag <haagch+mesadev@frickel.club> +Date: Thu, 20 Apr 2017 10:34:18 +0200 +Subject: [PATCH 1/2] ac: fix build after LLVM 5.0 SVN r300718 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +v2: previously getWithDereferenceableBytes() exists, but addAttr() doesn't take that type + +Signed-off-by: Christoph Haag <haagch+mesadev@frickel.club> +Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> +Tested-and-reviewed-by: Mike Lothian <mike@fireburn.co.uk> +--- +Upstream-Status: Backport + + src/amd/common/ac_llvm_helper.cpp | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/amd/common/ac_llvm_helper.cpp b/src/amd/common/ac_llvm_helper.cpp +index d9ea4b1..11fa809 100644 +--- a/src/amd/common/ac_llvm_helper.cpp ++++ b/src/amd/common/ac_llvm_helper.cpp +@@ -44,9 +44,13 @@ typedef AttributeSet AttributeList; + void ac_add_attr_dereferenceable(LLVMValueRef val, uint64_t bytes) + { + llvm::Argument *A = llvm::unwrap<llvm::Argument>(val); ++#if HAVE_LLVM < 0x0500 + llvm::AttrBuilder B; + B.addDereferenceableAttr(bytes); + A->addAttr(llvm::AttributeList::get(A->getContext(), A->getArgNo() + 1, B)); ++#else ++ A->addAttr(llvm::Attribute::getWithDereferenceableBytes(A->getContext(), bytes)); ++#endif + } + + bool ac_is_sgpr_param(LLVMValueRef arg) +-- +2.13.3 + |