[Mesa-dev] [PATCH 1/2] gallium: Enable aarch64 NEON CPU detection.

Matt Turner mattst88 at gmail.com
Wed Jan 23 23:46:42 UTC 2019


On Wed, Jan 23, 2019 at 3:26 PM Eric Anholt <eric at anholt.net> wrote:
>
> Matt Turner <mattst88 at gmail.com> writes:
>
> > NEON (now called ASIMD) is available on all aarch64 CPUs. It seems that
> > our code was missing an aarch64 path, leading to util_cpu_caps.has_neon
> > always being false on aarch64. I think that means that the NEON tiling
> > code in vc4 would not be enabled on aarch64 (vc4_load_lt_image_neon,
> > etc).
> > ---
> > I have very little clue about aarch64 ABIs, so I don't know if there's
> > another case that needs to be handled -- aarch32 maybe? Does
> > PIPE_ARCH_AARCH64 just mean ARMv8 and so we should check something else
> > for the ABI and choose Elf{32,64} based on that?
>
> Do we actually need to do runtime detection?  It sounds like "standard"
> armv8 is guaranteed NEON:
>
> http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.den0024a/CEGDJGGC.html

I think that's right.
https://gcc.gnu.org/onlinedocs/gcc/AArch64-Options.html seems to
agree:

‘simd’

Enable Advanced SIMD instructions. This also enables floating-point
instructions. This is on by default for all possible values for
options -march and -mcpu.

I'll send a new patch that just sets util_cpu_caps.has_neon = true for aarch64.


More information about the mesa-dev mailing list