Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/recipes-graphics/mesa/mesa/0001-llvmpipe-remove-the-power-of-two-sizeof-struct-cmd_b.patch b/recipes-graphics/mesa/mesa/0001-llvmpipe-remove-the
- new file mode 100644
- index 0000000..ef7f7e6
- --- /dev/null
- +++ b/recipes-graphics/mesa/mesa/0001-llvmpipe-remove-the-power-of-two-sizeof-struct-cmd_b.patch
- @@ -0,0 +1,38 @@
- +From 9915636fb8afe75ee2e8e013e4f495a4cb937afb Mon Sep 17 00:00:00 2001
- +From: Brian Paul <brianp@vmware.com>
- +Date: Wed, 6 Mar 2013 16:57:20 -0700
- +Subject: [PATCH] llvmpipe: remove the power of two sizeof(struct cmd_block)
- + assertion
- +MIME-Version: 1.0
- +Content-Type: text/plain; charset=UTF-8
- +Content-Transfer-Encoding: 8bit
- +
- +It fails on 32-bit systems (I only tested on 64-bit). Power of two
- +size isn't required, so just remove the assertion.
- +
- +Reviewed-by: José Fonseca <jfonseca@vmware.com>
- +---
- + src/gallium/drivers/llvmpipe/lp_scene.c | 7 -------
- + 1 file changed, 7 deletions(-)
- +
- +diff --git a/src/gallium/drivers/llvmpipe/lp_scene.c b/src/gallium/drivers/llvmpipe/lp_scene.c
- +index dd0943e..a0912eb 100644
- +--- a/src/gallium/drivers/llvmpipe/lp_scene.c
- ++++ b/src/gallium/drivers/llvmpipe/lp_scene.c
- +@@ -76,13 +76,6 @@ lp_scene_create( struct pipe_context *pipe )
- + assert(maxCommandBytes < LP_SCENE_MAX_SIZE);
- + /* We'll also need space for at least one other data block */
- + assert(maxCommandPlusData <= LP_SCENE_MAX_SIZE);
- +-
- +- /* Ideally, the size of a cmd_block object will be a power of two
- +- * in order to avoid wasting space when we allocation them from
- +- * data blocks (which are power of two also).
- +- */
- +- assert(sizeof(struct cmd_block) ==
- +- util_next_power_of_two(sizeof(struct cmd_block)));
- + }
- + #endif
- +
- +--
- +1.8.3
- +
- diff --git a/recipes-graphics/mesa/mesa/llvm-cross.patch b/recipes-graphics/mesa/mesa/llvm-cross.patch
- new file mode 100644
- index 0000000..913259a
- --- /dev/null
- +++ b/recipes-graphics/mesa/mesa/llvm-cross.patch
- @@ -0,0 +1,31 @@
- +--- a/configure.ac
- ++++ b/configure.ac
- +@@ -1912,7 +1912,7 @@ if test "x$MESA_LLVM" != x0; then
- + if test "x$with_llvm_shared_libs" = xyes; then
- + dnl We can't use $LLVM_VERSION because it has 'svn' stripped out,
- + LLVM_SO_NAME=LLVM-`$LLVM_CONFIG --version`
- +- AC_CHECK_FILE("$LLVM_LIBDIR/lib$LLVM_SO_NAME.so", llvm_have_one_so=yes,)
- ++ AS_IF([test -f "$LLVM_LIBDIR/lib$LLVM_SO_NAME.so"], [llvm_have_one_so=yes])
- +
- + if test "x$llvm_have_one_so" = xyes; then
- + dnl LLVM was built using auto*, so there is only one shared object.
- +@@ -1920,8 +1920,8 @@ if test "x$MESA_LLVM" != x0; then
- + else
- + dnl If LLVM was built with CMake, there will be one shared object per
- + dnl component.
- +- AC_CHECK_FILE("$LLVM_LIBDIR/libLLVMTarget.so",,
- +- AC_MSG_ERROR([Could not find llvm shared libraries:
- ++ AS_IF([test ! -f "$LLVM_LIBDIR/libLLVMTarget.so"],
- ++ [AC_MSG_ERROR([Could not find llvm shared libraries:
- + Please make sure you have built llvm with the --enable-shared option
- + and that your llvm libraries are installed in $LLVM_LIBDIR
- + If you have installed your llvm libraries to a different directory you
- +@@ -1932,7 +1932,7 @@ if test "x$MESA_LLVM" != x0; then
- + --enable-opencl
- + If you do not want to build with llvm shared libraries and instead want to
- + use llvm static libraries then remove these options from your configure
- +- invocation and reconfigure.]))
- ++ invocation and reconfigure.])])
- +
- + dnl We don't need to update LLVM_LIBS in this case because the LLVM
- + dnl install uses a shared object for each compoenent and we have
- diff --git a/recipes-graphics/mesa/mesa_9.1.3.bbappend b/recipes-graphics/mesa/mesa_9.1.3.bbappend
- new file mode 100644
- index 0000000..7981594
- --- /dev/null
- +++ b/recipes-graphics/mesa/mesa_9.1.3.bbappend
- @@ -0,0 +1,28 @@
- +DEPENDS += "llvm3.2"
- +EXTRA_OECONF := "${@'${EXTRA_OECONF}'.replace('--disable-gallium', '--enable-gallium-llvm')}"
- +EXTRA_OECONF := "${@'${EXTRA_OECONF}'.replace('--without-gallium-drivers', '--with-gallium-drivers=swrast')}"
- +EXTRA_OECONF += "--enable-gallium-egl --enable-texture-float --enable-xa --with-llvm-shared-libs --enable-glx"
- +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
- +SRC_URI += "file://llvm-cross.patch \
- + file://0001-llvmpipe-remove-the-power-of-two-sizeof-struct-cmd_b.patch"
- +export WANT_LLVM_RELEASE = "3.2"
- +
- +FILES_libdricore += "${libdir}/gallium-pipe/*.so"
- +FILES_libegl-mesa += "${libdir}/egl/egl_*.so"
- +FILES_libgbm += "${libdir}/gbm/*.so"
- +FILES_libgbm-dev += "${libdir}/gbm/*"
- +FILES_libxatracker-dev += "${includedir}/xa_*.h"
- +FILES_mesa-driver-swrast += "${libdir}/gallium-pipe/pipe_swrast.so"
- +
- +FILES_${PN}-dbg += "${libdir}/gbm/.debug/* ${libdir}/gallium-pipe/.debug/*"
- +
- +PACKAGES += "libxatracker-dev"
- +
- +# llvmpipe is slow if compiled with -fomit-frame-pointer (e.g. -O2)
- +FULL_OPTIMIZATION_append = " -fno-omit-frame-pointer"
- +
- +do_install_append () {
- + rm -f ${D}${libdir}/egl/*.la
- + rm -f ${D}${libdir}/gallium-pipe/*.la
- + rm -f ${D}${libdir}/gbm/*.la
- +}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement