Enable sse2neon in BLI_simd except for hydra/USD

This should get all of the tests to pass on Windows ARM64 platforms.

Sadly it needs disabling for hydra/USD stuff as currently it doesn't play nicely with the new preprocessor. @LazyDodo suggested a USD version update may fix this, which is something I can investigate in due course - right now, let's get daily builds up and working :)

Pull Request: https://projects.blender.org/blender/blender/pulls/121361
This commit is contained in:
Anthony Roberts
2024-05-02 20:05:51 +02:00
parent 39f0e3c0f4
commit 570b76f600
3 changed files with 8 additions and 6 deletions

View File

@@ -16,9 +16,8 @@
# error Including BLI_simd.hh requires C++
#endif
// TODO: Re-enable this once blenlib is converted to C++
#if (defined(__ARM_NEON) /* || (defined(_M_ARM64) && defined(_MSC_VER))*/) && \
defined(WITH_SSE2NEON)
#if (defined(__ARM_NEON) || (defined(_M_ARM64) && defined(_MSC_VER))) && \
defined(WITH_SSE2NEON) && !defined(DISABLE_SSE2NEON)
/* SSE/SSE2 emulation on ARM Neon. Match SSE precision. */
# if !defined(SSE2NEON_PRECISE_MINMAX)
# define SSE2NEON_PRECISE_MINMAX 1
@@ -39,7 +38,8 @@
# define BLI_HAVE_SSE2 0
#endif
#if defined(__ARM_NEON) && defined(WITH_SSE2NEON)
#if (defined(__ARM_NEON) || (defined(_M_ARM64) && defined(_MSC_VER))) && \
defined(WITH_SSE2NEON) && !defined(DISABLE_SSE2NEON)
/* SSE4 is emulated via sse2neon. */
# define BLI_HAVE_SSE4 1
#elif defined(__SSE4_2__)

View File

@@ -54,8 +54,9 @@ if(WIN32)
remove_cc_flag("/w34100")
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64")
# USD currently does not support the new preprocessor,
# and does not use sse2neon, so we can remove it here
# so we remove it here and disable sse2neon
remove_cc_flag("/Zc:preprocessor")
add_definitions(-DDISABLE_SSE2NEON)
endif()
endif()

View File

@@ -35,8 +35,9 @@ if(WIN32)
remove_cc_flag("/w34100")
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64")
# USD currently does not support the new preprocessor,
# and does not use sse2neon, so we can remove it here
# so we remove it here and disable sse2neon
remove_cc_flag("/Zc:preprocessor")
add_definitions(-DDISABLE_SSE2NEON)
endif()
endif()