summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Jansa <martin.jansa@gmail.com>2013-06-13 01:20:03 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-06-14 12:44:36 +0100
commitf6189cdd58bc15b7646bb0d6fcb4cd72acf769d3 (patch)
tree5db67207e35824d61932edd36d88a8ff7d2f46ee
parentf7db60ed00469075fdbb2b827f092bb50cae091d (diff)
downloadpoky-f6189cdd58bc15b7646bb0d6fcb4cd72acf769d3.tar.gz
mesa: introduce gallium-llvmpipe PACKAGECONFIG
(From OE-Core rev: d9f840725f3ea67fbd28d0903c99b729df5b1377) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-graphics/mesa/mesa.inc6
-rw-r--r--meta/recipes-graphics/mesa/mesa/0001-configure-Avoid-use-of-AC_CHECK_FILE-for-cross-compi.patch65
-rw-r--r--meta/recipes-graphics/mesa/mesa/0001-llvmpipe-remove-the-power-of-two-sizeof-struct-cmd_b.patch42
-rw-r--r--meta/recipes-graphics/mesa/mesa_9.1.3.bb2
-rw-r--r--meta/recipes-graphics/mesa/mesa_git.bb2
5 files changed, 117 insertions, 0 deletions
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index b4e9b84a64..6aba0cb127 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -51,6 +51,12 @@ PACKAGECONFIG[openvg] = "--enable-openvg, --disable-openvg"
51GALLIUMDRIVERS = "swrast" 51GALLIUMDRIVERS = "swrast"
52PACKAGECONFIG[gallium] = "--enable-gallium --with-gallium-drivers=${GALLIUMDRIVERS}, --disable-gallium --without-gallium-drivers" 52PACKAGECONFIG[gallium] = "--enable-gallium --with-gallium-drivers=${GALLIUMDRIVERS}, --disable-gallium --without-gallium-drivers"
53 53
54export WANT_LLVM_RELEASE = "3.2"
55PACKAGECONFIG[gallium-llvmpipe] = "--enable-gallium-llvm --enable-gallium-egl --enable-gallium-gbm --with-llvm-shared-libs --with-gallium-drivers=${GALLIUMDRIVERS}, --disable-gallium --without-gallium-drivers, llvm3.2"
56
57# llvmpipe is slow if compiled with -fomit-frame-pointer (e.g. -O2)
58FULL_OPTIMIZATION_append = " -fno-omit-frame-pointer"
59
54# Multiple virtual/gl providers being built breaks staging 60# Multiple virtual/gl providers being built breaks staging
55EXCLUDE_FROM_WORLD = "1" 61EXCLUDE_FROM_WORLD = "1"
56 62
diff --git a/meta/recipes-graphics/mesa/mesa/0001-configure-Avoid-use-of-AC_CHECK_FILE-for-cross-compi.patch b/meta/recipes-graphics/mesa/mesa/0001-configure-Avoid-use-of-AC_CHECK_FILE-for-cross-compi.patch
new file mode 100644
index 0000000000..9f7002a028
--- /dev/null
+++ b/meta/recipes-graphics/mesa/mesa/0001-configure-Avoid-use-of-AC_CHECK_FILE-for-cross-compi.patch
@@ -0,0 +1,65 @@
1From 877b8ea9a79d1d51f8e6b032801731538590d39e Mon Sep 17 00:00:00 2001
2From: Jonathan Liu <net147@gmail.com>
3Date: Tue, 4 Jun 2013 06:04:44 -0700
4Subject: [PATCH] configure: Avoid use of AC_CHECK_FILE for cross compiling
5
6The AC_CHECK_FILE macro can't be used for cross compiling as it will
7result in "error: cannot check for file existence when cross compiling".
8Replace it with the AS_IF macro.
9
10Upstream-Status: Submitted
11http://lists.freedesktop.org/archives/mesa-dev/2013-June/040168.html
12
13Signed-off-by: Jonathan Liu <net147@gmail.com>
14Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
15---
16 configure.ac | 12 ++++++------
17 1 file changed, 6 insertions(+), 6 deletions(-)
18
19diff --git a/configure.ac b/configure.ac
20index 36065f1..2b4a374 100644
21--- a/configure.ac
22+++ b/configure.ac
23@@ -1694,8 +1694,8 @@ if test "x$enable_gallium_llvm" = xyes; then
24 CLANG_LIBDIR=${LLVM_LIBDIR}
25 fi
26 CLANG_RESOURCE_DIR=$CLANG_LIBDIR/clang/${LLVM_VERSION}
27- AC_CHECK_FILE("$CLANG_RESOURCE_DIR/include/stddef.h",,
28- AC_MSG_ERROR([Could not find clang internal header stddef.h in $CLANG_RESOURCE_DIR Use --with-clang-libdir to specify the correct path to the clang libraries.]))
29+ AS_IF([test ! -f "$CLANG_RESOURCE_DIR/include/stddef.h"],
30+ [AC_MSG_ERROR([Could not find clang internal header stddef.h in $CLANG_RESOURCE_DIR Use --with-clang-libdir to specify the correct path to the clang libraries.])])
31 fi
32 else
33 MESA_LLVM=0
34@@ -1912,7 +1912,7 @@ if test "x$MESA_LLVM" != x0; then
35 if test "x$with_llvm_shared_libs" = xyes; then
36 dnl We can't use $LLVM_VERSION because it has 'svn' stripped out,
37 LLVM_SO_NAME=LLVM-`$LLVM_CONFIG --version`
38- AC_CHECK_FILE("$LLVM_LIBDIR/lib$LLVM_SO_NAME.so", llvm_have_one_so=yes,)
39+ AS_IF([test -f "$LLVM_LIBDIR/lib$LLVM_SO_NAME.so"], [llvm_have_one_so=yes])
40
41 if test "x$llvm_have_one_so" = xyes; then
42 dnl LLVM was built using auto*, so there is only one shared object.
43@@ -1920,8 +1920,8 @@ if test "x$MESA_LLVM" != x0; then
44 else
45 dnl If LLVM was built with CMake, there will be one shared object per
46 dnl component.
47- AC_CHECK_FILE("$LLVM_LIBDIR/libLLVMTarget.so",,
48- AC_MSG_ERROR([Could not find llvm shared libraries:
49+ AS_IF([test ! -f "$LLVM_LIBDIR/libLLVMTarget.so"],
50+ [AC_MSG_ERROR([Could not find llvm shared libraries:
51 Please make sure you have built llvm with the --enable-shared option
52 and that your llvm libraries are installed in $LLVM_LIBDIR
53 If you have installed your llvm libraries to a different directory you
54@@ -1932,7 +1932,7 @@ if test "x$MESA_LLVM" != x0; then
55 --enable-opencl
56 If you do not want to build with llvm shared libraries and instead want to
57 use llvm static libraries then remove these options from your configure
58- invocation and reconfigure.]))
59+ invocation and reconfigure.])])
60
61 dnl We don't need to update LLVM_LIBS in this case because the LLVM
62 dnl install uses a shared object for each compoenent and we have
63--
641.8.2.1
65
diff --git a/meta/recipes-graphics/mesa/mesa/0001-llvmpipe-remove-the-power-of-two-sizeof-struct-cmd_b.patch b/meta/recipes-graphics/mesa/mesa/0001-llvmpipe-remove-the-power-of-two-sizeof-struct-cmd_b.patch
new file mode 100644
index 0000000000..b74fddc5ea
--- /dev/null
+++ b/meta/recipes-graphics/mesa/mesa/0001-llvmpipe-remove-the-power-of-two-sizeof-struct-cmd_b.patch
@@ -0,0 +1,42 @@
1From 9915636fb8afe75ee2e8e013e4f495a4cb937afb Mon Sep 17 00:00:00 2001
2From: Brian Paul <brianp@vmware.com>
3Date: Wed, 6 Mar 2013 16:57:20 -0700
4Subject: [PATCH] llvmpipe: remove the power of two sizeof(struct cmd_block)
5 assertion
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10It fails on 32-bit systems (I only tested on 64-bit). Power of two
11size isn't required, so just remove the assertion.
12
13Reviewed-by: José Fonseca <jfonseca@vmware.com>
14
15Upstream-Status: Backport
16http://cgit.freedesktop.org/mesa/mesa/commit/?id=9915636fb8afe75ee2e8e013e4f495a4cb937afb
17
18---
19 src/gallium/drivers/llvmpipe/lp_scene.c | 7 -------
20 1 file changed, 7 deletions(-)
21
22diff --git a/src/gallium/drivers/llvmpipe/lp_scene.c b/src/gallium/drivers/llvmpipe/lp_scene.c
23index dd0943e..a0912eb 100644
24--- a/src/gallium/drivers/llvmpipe/lp_scene.c
25+++ b/src/gallium/drivers/llvmpipe/lp_scene.c
26@@ -76,13 +76,6 @@ lp_scene_create( struct pipe_context *pipe )
27 assert(maxCommandBytes < LP_SCENE_MAX_SIZE);
28 /* We'll also need space for at least one other data block */
29 assert(maxCommandPlusData <= LP_SCENE_MAX_SIZE);
30-
31- /* Ideally, the size of a cmd_block object will be a power of two
32- * in order to avoid wasting space when we allocation them from
33- * data blocks (which are power of two also).
34- */
35- assert(sizeof(struct cmd_block) ==
36- util_next_power_of_two(sizeof(struct cmd_block)));
37 }
38 #endif
39
40--
411.8.3
42
diff --git a/meta/recipes-graphics/mesa/mesa_9.1.3.bb b/meta/recipes-graphics/mesa/mesa_9.1.3.bb
index fc193f524b..ec95c10e14 100644
--- a/meta/recipes-graphics/mesa/mesa_9.1.3.bb
+++ b/meta/recipes-graphics/mesa/mesa_9.1.3.bb
@@ -3,6 +3,8 @@ require ${BPN}.inc
3SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/${PV}/MesaLib-${PV}.tar.bz2 \ 3SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/${PV}/MesaLib-${PV}.tar.bz2 \
4 file://EGL-Mutate-NativeDisplayType-depending-on-config.patch \ 4 file://EGL-Mutate-NativeDisplayType-depending-on-config.patch \
5 file://fix-glsl-cross.patch \ 5 file://fix-glsl-cross.patch \
6 file://0001-configure-Avoid-use-of-AC_CHECK_FILE-for-cross-compi.patch \
7 file://0001-llvmpipe-remove-the-power-of-two-sizeof-struct-cmd_b.patch \
6 " 8 "
7 9
8SRC_URI[md5sum] = "952ccd03547ed72333b64e1746cf8ada" 10SRC_URI[md5sum] = "952ccd03547ed72333b64e1746cf8ada"
diff --git a/meta/recipes-graphics/mesa/mesa_git.bb b/meta/recipes-graphics/mesa/mesa_git.bb
index ef0bec407f..5e252affa1 100644
--- a/meta/recipes-graphics/mesa/mesa_git.bb
+++ b/meta/recipes-graphics/mesa/mesa_git.bb
@@ -10,6 +10,8 @@ PV = "9.1.3+git${SRCPV}"
10SRC_URI = "git://anongit.freedesktop.org/git/mesa/mesa;protocol=git \ 10SRC_URI = "git://anongit.freedesktop.org/git/mesa/mesa;protocol=git \
11 file://EGL-Mutate-NativeDisplayType-depending-on-config.patch \ 11 file://EGL-Mutate-NativeDisplayType-depending-on-config.patch \
12 file://fix-glsl-cross.patch \ 12 file://fix-glsl-cross.patch \
13 file://0001-configure-Avoid-use-of-AC_CHECK_FILE-for-cross-compi.patch \
14 file://0001-llvmpipe-remove-the-power-of-two-sizeof-struct-cmd_b.patch \
13 " 15 "
14 16
15S = "${WORKDIR}/git" 17S = "${WORKDIR}/git"