From affe40ff19658e6feee3146a9a9df8661c3fb794 Mon Sep 17 00:00:00 2001 From: Kyle McMartin Date: Mon, 15 Jul 2013 11:12:47 -0400 Subject: [PATCH] Use LLVM::MCJIT on ARM and AArch64 --- mesa-llvmpipe-use-mcjit-on-arm.patch | 40 ++++++++++++++++++++++++++++ mesa.spec | 5 ++++ 2 files changed, 45 insertions(+) create mode 100644 mesa-llvmpipe-use-mcjit-on-arm.patch diff --git a/mesa-llvmpipe-use-mcjit-on-arm.patch b/mesa-llvmpipe-use-mcjit-on-arm.patch new file mode 100644 index 0000000..706c945 --- /dev/null +++ b/mesa-llvmpipe-use-mcjit-on-arm.patch @@ -0,0 +1,40 @@ +diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c +index 3258f03..e4cc058 100644 +--- a/src/gallium/auxiliary/gallivm/lp_bld_init.c ++++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c +@@ -49,7 +49,7 @@ + * - MC-JIT supports limited OSes (MacOSX and Linux) + * - standard JIT in LLVM 3.1, with backports + */ +-#if defined(PIPE_ARCH_PPC_64) || defined(PIPE_ARCH_S390) ++#if defined(PIPE_ARCH_PPC_64) || defined(PIPE_ARCH_S390) || defined(PIPE_ARCH_ARM) || defined(PIPE_ARCH_AARCH64) + # define USE_MCJIT 1 + # define HAVE_AVX 0 + #elif HAVE_LLVM >= 0x0302 || (HAVE_LLVM == 0x0301 && defined(HAVE_JIT_AVX_SUPPORT)) +diff --git a/src/gallium/include/pipe/p_config.h b/src/gallium/include/pipe/p_config.h +index 6b51160..96b5247 100644 +--- a/src/gallium/include/pipe/p_config.h ++++ b/src/gallium/include/pipe/p_config.h +@@ -114,6 +114,13 @@ + #define PIPE_ARCH_S390 + #endif + ++#if defined(__arm__) ++#define PIPE_ARCH_ARM ++#endif ++ ++#if defined(__aarch64__) ++#define PIPE_ARCH_AARCH64 ++#endif + + /* + * Endian detection. +@@ -148,7 +155,7 @@ + + #else + +-#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64) ++#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64) || defined(PIPE_ARCH_ARM) || defined(PIPE_ARCH_AARCH64) + #define PIPE_ARCH_LITTLE_ENDIAN + #elif defined(PIPE_ARCH_PPC) || defined(PIPE_ARCH_PPC_64) || defined(PIPE_ARCH_S390) + #define PIPE_ARCH_BIG_ENDIAN diff --git a/mesa.spec b/mesa.spec index 53b08a7..9c8a5bf 100644 --- a/mesa.spec +++ b/mesa.spec @@ -78,6 +78,7 @@ Patch16: mesa-9.2-no-useless-vdpau.patch Patch18: mesa-9.2-llvmpipe-on-big-endian.patch Patch19: mesa-9.2-no-gallium-osmesa.patch Patch20: 0001-Revert-i965-Disable-unused-pipeline-stages-once-at-s.patch +Patch30: mesa-llvmpipe-use-mcjit-on-arm.patch BuildRequires: pkgconfig autoconf automake libtool %if %{with_hardware} @@ -305,6 +306,7 @@ grep -q ^/ src/gallium/auxiliary/vl/vl_decoder.c && exit 1 %patch18 -p1 -b .be %patch19 -p1 -b .osmesa %patch20 -p1 -b .revert +%patch30 -p1 -b .arm %if 0%{with_private_llvm} sed -i 's/llvm-config/mesa-private-llvm-config-%{__isa_bits}/g' configure.ac @@ -604,6 +606,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Sun Jul 14 2013 Kyle McMartin +- Use LLVM::MCJIT on ARM and AArch64. + * Mon Jun 17 2013 Adam Jackson 9.2-0.12.20130610 - Re-enable hardware float support (#975204)