[Mesa-dev] [PATCH 4/4] meson: Enable VC4's NEON assembly support.

Dylan Baker dylan at pnwbakers.com
Wed Nov 8 22:21:14 UTC 2017


Quoting Eric Anholt (2017-11-08 14:14:57)
> ---
>  meson.build                         |  5 +++--
>  src/gallium/drivers/vc4/meson.build | 13 +++++++++++++
>  2 files changed, 16 insertions(+), 2 deletions(-)
> 
> diff --git a/meson.build b/meson.build
> index 0118c9a7c5ef..189c9be5b59c 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -485,8 +485,9 @@ endif
>  
>  # FIXME: enable asm when cross compiler
>  # This is doable (autotools does it), but it's not of immediate concern
> -if meson.is_cross_build()
> -  message('Cross compiling, disabling asm')
> +if meson.is_cross_build() and (host_machine.cpu_family() == 'x86' or
> +                               host_machine.cpu_family() == 'x86_64')

How about:
if meson.is_cross_build() and host_machine.cpu_family().startswith('x86')

Other than that, for the series:
Reviewed-by: Dylan Baker <dylan at pnwbakers.com>

> +  message('Cross compiling, disabling x86/x86_64 asm')
>    with_asm = false
>  endif
>  
> diff --git a/src/gallium/drivers/vc4/meson.build b/src/gallium/drivers/vc4/meson.build
> index 38b47fbdd977..572d4b4fa9aa 100644
> --- a/src/gallium/drivers/vc4/meson.build
> +++ b/src/gallium/drivers/vc4/meson.build
> @@ -81,6 +81,18 @@ files_libvc4 = files(
>    'vc4_uniforms.c',
>  )
>  
> +libvc4_neon = []
> +if with_asm_arch == 'arm'
> +  libvc4_neon = static_library(
> +    'vc4_neon',
> +    'vc4_tiling_lt_neon.c',
> +    include_directories : [
> +      inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_broadcom
> +    ],
> +    c_args : '-mfpu=neon',
> +  )
> +endif
> +
>  simpenrose_c_args = []
>  dep_simpenrose = dependency('simpenrose', required : false)
>  if dep_simpenrose.found()
> @@ -94,6 +106,7 @@ libvc4 = static_library(
>      inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_broadcom,
>      inc_gallium_drivers, inc_drm_uapi,
>    ],
> +  link_with: libvc4_neon,
>    c_args : [c_vis_args, simpenrose_c_args],
>    cpp_args : [cpp_vis_args],
>    dependencies : [dep_simpenrose, dep_libdrm, dep_valgrind],
> -- 
> 2.15.0
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20171108/cabd06fb/attachment.sig>


More information about the mesa-dev mailing list