sdl/cpuinfo: Add HasNEON() for SDL2 2.0.6
@@ -27,6 +27,14 @@ static inline SDL_bool SDL_HasAVX2()
}
#endif
+#if !(SDL_VERSION_ATLEAST(2,0,6))
+#pragma message("SDL_HasNEON is not supported before SDL 2.0.4")
+static inline SDL_bool SDL_HasNEON()
+{
+ return SDL_FALSE;
+}
+#endif
+
*/
import "C"
@@ -116,3 +124,9 @@ func HasAVX() bool {
func HasAVX2() bool {
return C.SDL_HasAVX2() > 0
}
+
+// HasNEON reports whether the CPU has NEON features.
+// (https://wiki.libsdl.org/SDL_HasNEON)
+func HasNEON() bool {
+ return C.SDL_HasNEON() > 0
+}
