mirror of https://github.com/libsdl-org/SDL.git
Properly shortcut only when AVX2 or SSE4.1 available
This commit is contained in:
parent
3e0581c625
commit
f68a7edcf8
|
|
@ -1383,7 +1383,7 @@ SDL_BlitFunc SDL_CalculateBlitA(SDL_Surface *surface)
|
||||||
|
|
||||||
case 4:
|
case 4:
|
||||||
#if defined(SDL_SSE4_1_INTRINSICS) || defined(SDL_AVX2_INTRINSICS)
|
#if defined(SDL_SSE4_1_INTRINSICS) || defined(SDL_AVX2_INTRINSICS)
|
||||||
if (sf->BytesPerPixel == 4 && df->BytesPerPixel == 4) {
|
if (sf->BytesPerPixel == 4 && df->BytesPerPixel == 4 && (SDL_HasAVX2() || SDL_HasSSE41())) {
|
||||||
return BlitNtoNPixelAlpha;
|
return BlitNtoNPixelAlpha;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue