Burst Neon support on Apple Silicon

I am wondering if neon intrinsics are supported on apple silicon with the burst compiler. IsNeonSupported is returning false on my M1 Pro machine in both the editor and build, but supposedly apple silicon is supposed to have support for neon. Is there some setting you have to configure to get it working in unity?

Hi @Sam3million - yes, Burst’s Neon intrinsics should be supported on Apple Silicon. Please could you report a bug (via Editor > Help > Report a Bug) with a repro project, and we’ll take a look?

Ok, I’ve done so

Thanks for reporting the bug. When called from managed code, Unity.Burst.Intrinsics.Arm.Neon.IsNeonSupported will always return false:

public class NeonSupport : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        Debug.Log("Neon support: " + Unity.Burst.Intrinsics.Arm.Neon.IsNeonSupported);
    }
}

Instead you should call that API inside Burst-compiled code, like this:

public class NeonSupport : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        Debug.Log("Neon support: " + NeonSupportBurstCompiled.CheckIsNeonSupported());
    }
}

[Unity.Burst.BurstCompile]
public class NeonSupportBurstCompiled
{
    [Unity.Burst.BurstCompile(CompileSynchronously = true)]
    bool CheckIsNeonSupported() => Unity.Burst.Intrinsics.Arm.Neon.IsNeonSupported);
}

(And then, you probably also want to use Burst’s Neon APIs inside Burst-compiled code.)