cmake: Allow build system to disable arm neon intrinsics

This commit is contained in:
Anonymous Maarten
2023-02-26 01:51:19 +01:00
committed by Anonymous Maarten
parent 46de6241d7
commit fc4085b54e
6 changed files with 22 additions and 13 deletions

View File

@@ -186,8 +186,7 @@
#include <SDL3/SDL.h>
#include <SDL3/SDL_intrin.h>
#ifdef __ARM_NEON
#if defined(__ARM_NEON) && !defined(SDL_DISABLE_NEON)
#define HAVE_NEON_INTRINSICS 1
#endif

View File

@@ -23,10 +23,6 @@
#include "SDL_audio_c.h"
#include "SDL_audiocvt_c.h"
#ifdef __ARM_NEON
#define HAVE_NEON_INTRINSICS 1
#endif
#if defined(__x86_64__) && HAVE_SSE2_INTRINSICS
#define NEED_SCALAR_CONVERTER_FALLBACKS 0 /* x86_64 guarantees SSE2. */
#elif __MACOS__ && HAVE_SSE2_INTRINSICS

View File

@@ -332,14 +332,13 @@ static int scale_mat(const Uint32 *src, int src_w, int src_h, int src_pitch,
return 0;
}
#if defined(__ARM_NEON)
#define HAVE_NEON_INTRINSICS 1
#if HAVE_NEON_INTRINSICS
#define CAST_uint8x8_t (uint8x8_t)
#define CAST_uint32x2_t (uint32x2_t)
#endif
#if defined(__WINRT__) || defined(_MSC_VER)
#if defined(HAVE_NEON_INTRINSICS)
#if HAVE_NEON_INTRINSICS
#undef CAST_uint8x8_t
#undef CAST_uint32x2_t
#define CAST_uint8x8_t