The following code throws a compile error when i try to make a build for Android:
if (IsSse2Supported)
{
while (targetOffset - DataOffset >= 16)
{
// load data
v128 data = loadu_si128(pData + DataOffset);
// xor
var result = xor_si128(data, mask);
// store
storeu_si128(pData + DataOffset, result);
// advance
DataOffset += 16;
}
}
else if (IsNeonSupported)
{
while (targetOffset - DataOffset >= 16)
{
// load data
v128 data = vld1q_u8(pData + DataOffset);
// xor
v128 result = veorq_u8(data, mask);
// store
vst1q_u8(pData + DataOffset, result);
// advance
DataOffset += 16;
}
}
It logs out two errors:
Library\Bee\artifacts\Android\AsyncPluginsFromLinker: .\Library\PackageCache\com.unity.burst@1.8.10\Runtime\Intrinsics\x86\Sse2.cs(3086,17): Burst error BC1200: The instruction Unity.Burst.Intrinsics.X86.GenericCSharpLoad(void* ptr)
requires CPU feature SSE
but the current block only supports None
and the target CPU for this method is ARM_NEON
. Consider enclosing the usage of this instruction with an if test for the appropriate IsXXXSupported
property.
UnityEditor.EditorApplication:Internal_CallGlobalEventHandler ()
Library\Bee\artifacts\Android\AsyncPluginsFromLinker: .\Library\PackageCache\com.unity.burst@1.8.10\Runtime\Intrinsics\x86\Sse2.cs(3116,17): Burst error BC1200: The instruction Unity.Burst.Intrinsics.X86.GenericCSharpStore(void* ptr, Unity.Burst.Intrinsics.v128 val)
requires CPU feature SSE
but the current block only supports None
and the target CPU for this method is ARM_NEON
. Consider enclosing the usage of this instruction with an if test for the appropriate IsXXXSupported
property.
UnityEditor.EditorApplication:Internal_CallGlobalEventHandler ()
As can be seen above, my code already tests for IsSse2Supported.
If i remove the first block of code it compiles just fine. Building for non-Android platforms doesn’t complain about the Neon code.
Hi @BestHTTP ,
First, thank you so much for reaching out to us here! People like you help us make Burst and Unity better and more robust.
It indeed looks like bug-like behavior to us. Is it possible for you to file an official bug-report with your/a project that reproduces the bug-behavior included so we can reproduce the issue on our end and investigate it thoroughly? (here’s how to file formal bug-reports in Unity ). That would help us immensely!
@Miro_Brodlova Reported, its id is IN-60973.
1 Like