apply simplified sve2 macro protection

This commit is contained in:
Gabriel Wang
2026-05-18 14:16:22 +08:00
committed by Sam Lantinga
parent 296231e999
commit 8d9d6b1b2b
2 changed files with 7 additions and 7 deletions

View File

@@ -25,7 +25,7 @@
#include "SDL_pixels_c.h"
#include "SDL_surface_c.h"
#if defined(SDL_SVE2_INTRINSICS) && (__ARM_ARCH >= 8) && (defined(__aarch64__) || defined(_M_ARM64))
#ifdef SDL_SVE2_INTRINSICS
#include "./arm/SDL_sve2_blit_A.h"
#endif
@@ -1481,7 +1481,7 @@ SDL_BlitFunc SDL_CalculateBlitA(SDL_Surface *surface)
}
case 2:
#if defined(SDL_SVE2_INTRINSICS) && (__ARM_ARCH >= 8) && (defined(__aarch64__) || defined(_M_ARM64))
#ifdef SDL_SVE2_INTRINSICS
if (SDL_HasSVE2()) {
if (sf->bytes_per_pixel == 4 &&
df->bytes_per_pixel == 2 &&
@@ -1519,11 +1519,11 @@ SDL_BlitFunc SDL_CalculateBlitA(SDL_Surface *surface)
return Blit8888to8888PixelAlphaSwizzleLSX;
}
#endif
#if defined(SDL_SVE2_INTRINSICS) && (__ARM_ARCH >= 8) && (defined(__aarch64__) || defined(_M_ARM64))
#ifdef SDL_SVE2_INTRINSICS
if (SDL_HasSVE2()
/* NEON is faster than SVE2 when vector size is 128bit */
#if defined(SDL_NEON_INTRINSICS)
&& SDL_GetSVEVectorSize() > 128
&& (SDL_GetSVEVectorSize() > 128 || !SDL_HasNEON())
#endif
) {
// To prevent "unused function" compiler warnings/errors

View File

@@ -26,7 +26,7 @@
#include "SDL_surface_c.h"
#include "SDL_blit_copy.h"
#if defined(SDL_SVE2_INTRINSICS) && (__ARM_ARCH >= 8) && (defined(__aarch64__) || defined(_M_ARM64))
#ifdef SDL_SVE2_INTRINSICS
#include "./arm/SDL_sve2_blit_N.h"
#endif
@@ -3121,7 +3121,7 @@ SDL_BlitFunc SDL_CalculateBlitN(SDL_Surface *surface)
return Blit8888to8888PixelSwizzleSSE41;
}
#endif
#if defined(SDL_SVE2_INTRINSICS) && (__ARM_ARCH >= 8) && (defined(__aarch64__) || defined(_M_ARM64))
#ifdef SDL_SVE2_INTRINSICS
if (SDL_HasSVE2()) {
return Blit8888to8888PixelSwizzleSVE2;
}
@@ -3132,7 +3132,7 @@ SDL_BlitFunc SDL_CalculateBlitN(SDL_Surface *surface)
}
#endif
}
#if defined(SDL_SVE2_INTRINSICS) && (__ARM_ARCH >= 8) && (defined(__aarch64__) || defined(_M_ARM64))
#ifdef SDL_SVE2_INTRINSICS
if (SDL_HasSVE2()) {
/* RGBA8888/ARGB8888/XRGB8888 -> RGB565 */
if (srcfmt->bytes_per_pixel == 4 &&