Compare commits

...

3 Commits

Author SHA1 Message Date
Mikhail Morozov d69179d424
Merge 89f598df6c into ae721c50ea 2024-04-03 20:40:15 +00:00
Mikhail Morozov 89f598df6c Check if STBI_NEON already defined so no warning will be produced 2024-04-03 23:40:01 +03:00
Mikhail Morozov 220964dfb7 Enable ARM NEON on ARM64 2024-04-03 23:40:01 +03:00
1 changed files with 9 additions and 1 deletions

View File

@ -692,6 +692,8 @@ typedef unsigned char validate_uint32[sizeof(stbi__uint32)==4 ? 1 : -1];
#define STBI__X64_TARGET
#elif defined(__i386) || defined(_M_IX86)
#define STBI__X86_TARGET
#elif defined(__aarch64__) || defined(_M_ARM64)
#define STBI__ARM64_TARGET
#endif
#if defined(__GNUC__) && defined(STBI__X86_TARGET) && !defined(__SSE2__) && !defined(STBI_NO_SIMD)
@ -774,9 +776,15 @@ static int stbi__sse2_available(void)
#endif
// ARM NEON
#if defined(STBI_NO_SIMD) && defined(STBI_NEON)
#if defined(STBI_NO_SIMD)
#if defined(STBI_NEON)
#undef STBI_NEON
#endif
#elif defined(STBI__ARM64_TARGET)
#if !defined(STBI_NEON)
#define STBI_NEON
#endif
#endif
#ifdef STBI_NEON
#include <arm_neon.h>