Mesa (staging/18.3): vc4: Enable NEON asm on meson cross-builds.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jan 31 12:11:49 UTC 2019


Module: Mesa
Branch: staging/18.3
Commit: f072585522a137b3b01cb08d624f6e3f340e6583
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f072585522a137b3b01cb08d624f6e3f340e6583

Author: Eric Anholt <eric at anholt.net>
Date:   Mon Jan 28 11:39:12 2019 -0800

vc4: Enable NEON asm on meson cross-builds.

The core Mesa with_asm_arch and USE_ARM_ASM flags are disabled for meson
cross-builds because of the need to run host binaries on the build system.
vc4 doesn't need to do that, so skip with_asm_arch to enable NEON on my
cross-builds.

Fixes: ebcb4c2156e9 ("meson: Enable VC4's NEON assembly support.")
(cherry picked from commit 932ed9c00b99e6ec92146ec9e820f546cf3e6551)

---

 src/gallium/drivers/vc4/meson.build | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/vc4/meson.build b/src/gallium/drivers/vc4/meson.build
index 50adcc25f2..0d7a03cd24 100644
--- a/src/gallium/drivers/vc4/meson.build
+++ b/src/gallium/drivers/vc4/meson.build
@@ -81,8 +81,10 @@ files_libvc4 = files(
   'vc4_uniforms.c',
 )
 
+vc4_c_args = []
+
 libvc4_neon = []
-if with_asm_arch == 'arm'
+if host_machine.cpu_family() == 'arm'
   libvc4_neon = static_library(
     'vc4_neon',
     'vc4_tiling_lt_neon.c',
@@ -91,12 +93,12 @@ if with_asm_arch == 'arm'
     ],
     c_args : '-mfpu=neon',
   )
+  vc4_c_args += '-DUSE_ARM_ASM'
 endif
 
-simpenrose_c_args = []
 dep_simpenrose = dependency('simpenrose', required : false)
 if dep_simpenrose.found()
-  simpenrose_c_args = '-DUSE_VC4_SIMULATOR'
+  vc4_c_args += '-DUSE_VC4_SIMULATOR'
 endif
 
 libvc4 = static_library(
@@ -107,7 +109,7 @@ libvc4 = static_library(
     inc_gallium_drivers, inc_drm_uapi,
   ],
   link_with: libvc4_neon,
-  c_args : [c_vis_args, simpenrose_c_args],
+  c_args : [c_vis_args, vc4_c_args],
   cpp_args : [cpp_vis_args],
   dependencies : [dep_simpenrose, dep_libdrm, dep_valgrind, idep_nir_headers],
   build_by_default : false,




More information about the mesa-commit mailing list