[Mesa-dev] [PATCH v3 4/4] vc4: Only build the NEON code on arm32.

Grazvydas Ignotas notasas at gmail.com
Sat Apr 15 16:59:52 UTC 2017


On Fri, Apr 14, 2017 at 8:47 PM, Eric Anholt <eric at anholt.net> wrote:

> NEON is sufficiently different on arm64 that we can't just reuse this
> code.  Disable it on arm64 for now.
>
> Signed-off-by: Eric Anholt <eric at anholt.net>
> ---
>  src/gallium/drivers/vc4/vc4_tiling_lt.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/gallium/drivers/vc4/vc4_tiling_lt.c
> b/src/gallium/drivers/vc4/vc4_tiling_lt.c
> index c9cbc65e2dbc..7de67b652daa 100644
> --- a/src/gallium/drivers/vc4/vc4_tiling_lt.c
> +++ b/src/gallium/drivers/vc4/vc4_tiling_lt.c
> @@ -61,7 +61,7 @@ static void
>  vc4_load_utile(void *cpu, void *gpu, uint32_t cpu_stride, uint32_t cpp)
>  {
>          uint32_t gpu_stride = vc4_utile_stride(cpp);
> -#if defined(VC4_BUILD_NEON) && defined(__ARM_ARCH)
> +#if defined(VC4_BUILD_NEON) && defined(__ARM_ARCH) && __ARM_ARCH <= 7
>

This doesn't look right, __ARM_ARCH can be 8 on 32bit, try -mcpu=cortex-a57
on a 32bit toolchain for example. Could use PIPE_ARCH_ARM I guess, or
!PIPE_ARCH_AARCH64, or maybe use the intrinsics...

GraÅžvydas

         if (gpu_stride == 8) {
>                  __asm__ volatile (
>                          /* Load from the GPU in one shot, no interleave,
> to
> @@ -118,7 +118,7 @@ vc4_store_utile(void *gpu, void *cpu, uint32_t
> cpu_stride, uint32_t cpp)
>  {
>          uint32_t gpu_stride = vc4_utile_stride(cpp);
>
> -#if defined(VC4_BUILD_NEON) && defined(__ARM_ARCH)
> +#if defined(VC4_BUILD_NEON) && defined(__ARM_ARCH) && __ARM_ARCH <= 7
>          if (gpu_stride == 8) {
>                  __asm__ volatile (
>                          /* Load each 8-byte line from cpu-side source,
> --
> 2.11.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170415/c70a8251/attachment-0001.html>


More information about the mesa-dev mailing list