mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-20 20:46:02 +08:00
video: don't use NEON blitters when SDL_HasNEON returns false
This commit is contained in:
committed by
Anonymous Maarten
parent
db7ac820f9
commit
2038005657
@@ -1533,17 +1533,15 @@ SDL_BlitFunc SDL_CalculateBlitA(SDL_Surface *surface)
|
||||
}
|
||||
#endif
|
||||
#if defined(SDL_NEON_INTRINSICS) && (__ARM_ARCH >= 8) && (defined(__aarch64__) || defined(_M_ARM64))
|
||||
// To prevent "unused function" compiler warnings/errors
|
||||
(void)Blit8888to8888PixelAlpha;
|
||||
(void)Blit8888to8888PixelAlphaSwizzle;
|
||||
return Blit8888to8888PixelAlphaSwizzleNEON;
|
||||
#else
|
||||
if (SDL_HasNEON()) {
|
||||
return Blit8888to8888PixelAlphaSwizzleNEON;
|
||||
}
|
||||
#endif
|
||||
if (sf->format == df->format) {
|
||||
return Blit8888to8888PixelAlpha;
|
||||
} else {
|
||||
return Blit8888to8888PixelAlphaSwizzle;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
return BlitNtoNPixelAlpha;
|
||||
|
||||
|
||||
@@ -3127,7 +3127,9 @@ SDL_BlitFunc SDL_CalculateBlitN(SDL_Surface *surface)
|
||||
}
|
||||
#endif
|
||||
#if defined(SDL_NEON_INTRINSICS) && (__ARM_ARCH >= 8) && (defined(__aarch64__) || defined(_M_ARM64))
|
||||
return Blit8888to8888PixelSwizzleNEON;
|
||||
if (SDL_HasNEON()) {
|
||||
return Blit8888to8888PixelSwizzleNEON;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#if defined(SDL_SVE2_INTRINSICS) && (__ARM_ARCH >= 8) && (defined(__aarch64__) || defined(_M_ARM64))
|
||||
|
||||
Reference in New Issue
Block a user