Advertisement
Guest User

Untitled

a guest
Jun 4th, 2013
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 5.17 KB | None | 0 0
  1. 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
  2. new file mode 100644
  3. index 0000000..ef7f7e6
  4. --- /dev/null
  5. +++ b/recipes-graphics/mesa/mesa/0001-llvmpipe-remove-the-power-of-two-sizeof-struct-cmd_b.patch
  6. @@ -0,0 +1,38 @@
  7. +From 9915636fb8afe75ee2e8e013e4f495a4cb937afb Mon Sep 17 00:00:00 2001
  8. +From: Brian Paul <brianp@vmware.com>
  9. +Date: Wed, 6 Mar 2013 16:57:20 -0700
  10. +Subject: [PATCH] llvmpipe: remove the power of two sizeof(struct cmd_block)
  11. + assertion
  12. +MIME-Version: 1.0
  13. +Content-Type: text/plain; charset=UTF-8
  14. +Content-Transfer-Encoding: 8bit
  15. +
  16. +It fails on 32-bit systems (I only tested on 64-bit).  Power of two
  17. +size isn't required, so just remove the assertion.
  18. +
  19. +Reviewed-by: José Fonseca <jfonseca@vmware.com>
  20. +---
  21. + src/gallium/drivers/llvmpipe/lp_scene.c | 7 -------
  22. + 1 file changed, 7 deletions(-)
  23. +
  24. +diff --git a/src/gallium/drivers/llvmpipe/lp_scene.c b/src/gallium/drivers/llvmpipe/lp_scene.c
  25. +index dd0943e..a0912eb 100644
  26. +--- a/src/gallium/drivers/llvmpipe/lp_scene.c
  27. ++++ b/src/gallium/drivers/llvmpipe/lp_scene.c
  28. +@@ -76,13 +76,6 @@ lp_scene_create( struct pipe_context *pipe )
  29. +       assert(maxCommandBytes < LP_SCENE_MAX_SIZE);
  30. +       /* We'll also need space for at least one other data block */
  31. +       assert(maxCommandPlusData <= LP_SCENE_MAX_SIZE);
  32. +-
  33. +-      /* Ideally, the size of a cmd_block object will be a power of two
  34. +-       * in order to avoid wasting space when we allocation them from
  35. +-       * data blocks (which are power of two also).
  36. +-       */
  37. +-      assert(sizeof(struct cmd_block) ==
  38. +-             util_next_power_of_two(sizeof(struct cmd_block)));
  39. +    }
  40. + #endif
  41. +
  42. +--
  43. +1.8.3
  44. +
  45. diff --git a/recipes-graphics/mesa/mesa/llvm-cross.patch b/recipes-graphics/mesa/mesa/llvm-cross.patch
  46. new file mode 100644
  47. index 0000000..913259a
  48. --- /dev/null
  49. +++ b/recipes-graphics/mesa/mesa/llvm-cross.patch
  50. @@ -0,0 +1,31 @@
  51. +--- a/configure.ac
  52. ++++ b/configure.ac
  53. +@@ -1912,7 +1912,7 @@ if test "x$MESA_LLVM" != x0; then
  54. +     if test "x$with_llvm_shared_libs" = xyes; then
  55. +         dnl We can't use $LLVM_VERSION because it has 'svn' stripped out,
  56. +         LLVM_SO_NAME=LLVM-`$LLVM_CONFIG --version`
  57. +-        AC_CHECK_FILE("$LLVM_LIBDIR/lib$LLVM_SO_NAME.so", llvm_have_one_so=yes,)
  58. ++        AS_IF([test -f "$LLVM_LIBDIR/lib$LLVM_SO_NAME.so"], [llvm_have_one_so=yes])
  59. +
  60. +         if test "x$llvm_have_one_so" = xyes; then
  61. +             dnl LLVM was built using auto*, so there is only one shared object.
  62. +@@ -1920,8 +1920,8 @@ if test "x$MESA_LLVM" != x0; then
  63. +         else
  64. +             dnl If LLVM was built with CMake, there will be one shared object per
  65. +             dnl component.
  66. +-            AC_CHECK_FILE("$LLVM_LIBDIR/libLLVMTarget.so",,
  67. +-                    AC_MSG_ERROR([Could not find llvm shared libraries:
  68. ++            AS_IF([test ! -f "$LLVM_LIBDIR/libLLVMTarget.so"],
  69. ++                    [AC_MSG_ERROR([Could not find llvm shared libraries:
  70. +       Please make sure you have built llvm with the --enable-shared option
  71. +       and that your llvm libraries are installed in $LLVM_LIBDIR
  72. +       If you have installed your llvm libraries to a different directory you
  73. +@@ -1932,7 +1932,7 @@ if test "x$MESA_LLVM" != x0; then
  74. +               --enable-opencl
  75. +       If you do not want to build with llvm shared libraries and instead want to
  76. +       use llvm static libraries then remove these options from your configure
  77. +-      invocation and reconfigure.]))
  78. ++      invocation and reconfigure.])])
  79. +
  80. +            dnl We don't need to update LLVM_LIBS in this case because the LLVM
  81. +            dnl install uses a shared object for each compoenent and we have
  82. diff --git a/recipes-graphics/mesa/mesa_9.1.3.bbappend b/recipes-graphics/mesa/mesa_9.1.3.bbappend
  83. new file mode 100644
  84. index 0000000..7981594
  85. --- /dev/null
  86. +++ b/recipes-graphics/mesa/mesa_9.1.3.bbappend
  87. @@ -0,0 +1,28 @@
  88. +DEPENDS += "llvm3.2"
  89. +EXTRA_OECONF := "${@'${EXTRA_OECONF}'.replace('--disable-gallium', '--enable-gallium-llvm')}"
  90. +EXTRA_OECONF := "${@'${EXTRA_OECONF}'.replace('--without-gallium-drivers', '--with-gallium-drivers=swrast')}"
  91. +EXTRA_OECONF += "--enable-gallium-egl --enable-texture-float --enable-xa --with-llvm-shared-libs --enable-glx"
  92. +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
  93. +SRC_URI += "file://llvm-cross.patch \
  94. +            file://0001-llvmpipe-remove-the-power-of-two-sizeof-struct-cmd_b.patch"
  95. +export WANT_LLVM_RELEASE = "3.2"
  96. +
  97. +FILES_libdricore += "${libdir}/gallium-pipe/*.so"
  98. +FILES_libegl-mesa += "${libdir}/egl/egl_*.so"
  99. +FILES_libgbm += "${libdir}/gbm/*.so"
  100. +FILES_libgbm-dev += "${libdir}/gbm/*"
  101. +FILES_libxatracker-dev += "${includedir}/xa_*.h"
  102. +FILES_mesa-driver-swrast += "${libdir}/gallium-pipe/pipe_swrast.so"
  103. +
  104. +FILES_${PN}-dbg += "${libdir}/gbm/.debug/* ${libdir}/gallium-pipe/.debug/*"
  105. +
  106. +PACKAGES += "libxatracker-dev"
  107. +
  108. +# llvmpipe is slow if compiled with -fomit-frame-pointer (e.g. -O2)
  109. +FULL_OPTIMIZATION_append = " -fno-omit-frame-pointer"
  110. +
  111. +do_install_append () {
  112. +    rm -f ${D}${libdir}/egl/*.la
  113. +    rm -f ${D}${libdir}/gallium-pipe/*.la
  114. +    rm -f ${D}${libdir}/gbm/*.la
  115. +}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement