瀏覽代碼

Properly shortcut only when AVX2 or SSE4.1 available

Isaac Aronson 2 年之前
父節點
當前提交
f68a7edcf8
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/video/SDL_blit_A.c

+ 1 - 1
src/video/SDL_blit_A.c

@@ -1383,7 +1383,7 @@ SDL_BlitFunc SDL_CalculateBlitA(SDL_Surface *surface)
 
         case 4:
 #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;
             }
 #endif