diff src/video/SDL_blit.c @ 5264:6a65c1fc07af

Updated CPU detection code for SSE3 and SSE4 and removed obsolete 3DNow! and Altivec support.
author Sam Lantinga <slouken@libsdl.org>
date Fri, 11 Feb 2011 14:51:04 -0800
parents d976b67150c5
children b530ef003506
line wrap: on
line diff
--- a/src/video/SDL_blit.c	Fri Feb 11 14:42:58 2011 -0800
+++ b/src/video/SDL_blit.c	Fri Feb 11 14:51:04 2011 -0800
@@ -100,30 +100,6 @@
     return (okay ? 0 : -1);
 }
 
-#ifdef __MACOSX__
-#include <sys/sysctl.h>
-
-static SDL_bool
-SDL_UseAltivecPrefetch()
-{
-    const char key[] = "hw.l3cachesize";
-    u_int64_t result = 0;
-    size_t typeSize = sizeof(result);
-
-    if (sysctlbyname(key, &result, &typeSize, NULL, 0) == 0 && result > 0) {
-        return SDL_TRUE;
-    } else {
-        return SDL_FALSE;
-    }
-}
-#else
-static SDL_bool
-SDL_UseAltivecPrefetch()
-{
-    /* Just guess G4 */
-    return SDL_TRUE;
-}
-#endif /* __MACOSX__ */
 
 static SDL_BlitFunc
 SDL_ChooseBlitFunc(Uint32 src_format, Uint32 dst_format, int flags,
@@ -145,22 +121,12 @@
             if (SDL_HasMMX()) {
                 features |= SDL_CPU_MMX;
             }
-            if (SDL_Has3DNow()) {
-                features |= SDL_CPU_3DNOW;
-            }
             if (SDL_HasSSE()) {
                 features |= SDL_CPU_SSE;
             }
             if (SDL_HasSSE2()) {
                 features |= SDL_CPU_SSE2;
             }
-            if (SDL_HasAltiVec()) {
-                if (SDL_UseAltivecPrefetch()) {
-                    features |= SDL_CPU_ALTIVEC_PREFETCH;
-                } else {
-                    features |= SDL_CPU_ALTIVEC_NOPREFETCH;
-                }
-            }
         }
     }