“The instruction Unity.Burst.Intrinsics.X86.Sse4_1.min_epi8(Unity.Burst.Intrinsics.v128 a, Unity.Burst.Intrinsics.v128 b) requires CPU feature SSE41 but the current block only supports None and the target CPU for this method is SSE2AndLower. Consider enclosing the usage of this instruction with an if test for the appropriate IsXXXSupported property.”
which started happening once implementing Occlusion Culling on Hybrid.
The statements that it refers to are inside of #if MOC_USE_SSE41
Does anyone have any clues as to what might be causing this?
Edit_______________________
I have SSE4 enabled for 64-bit architecture in the settings (set to Everything), and am using a capable CPU, but still cannot seem to build this out.
I got some help and the problem was that I was using a assembly define (#if MOC_USE_SSE41) to filter for SSE4 but that is stripped out before it gets to Burst. It needs to be defined in an if statement like:
if (X86.Sse4_1.IsSse41Supported) {
// use it here
}
hmm I got a same error when building for windows x86_64
The instruction `Unity.Burst.Intrinsics.X86.Sse4_1.testz_si128(Unity.Burst.Intrinsics.v128 a, Unity.Burst.Intrinsics.v128 b)` requires CPU feature `SSE41` but the current block only supports `None` and the target CPU for this method is `SSE2AndLower`. Consider enclosing the usage of this instruction with an if test for the appropriate `IsXXXSupported` property.
coming from Library\PackageCache\com.unity.rendering.hybrid@0.51.0-preview.32\Unity.Rendering.Hybrid\Occlusion\BurstIntrinsics\MOC.cs
Not sure if you solved in the end (please post it next time) but the solution is that you need to add an if statement to check for it. not an compile one #if, a normal if.
For example:
// We need this at compile time!
if (Avx.IsAvxSupported == false)
{
min = 0;
max = 0;
return;
}