comparison src/video/SDL_blit.c @ 2249:5a58b57b6724

Added SSE and MMX optimization for SDL_FillRect()
author Sam Lantinga <slouken@libsdl.org>
date Thu, 16 Aug 2007 05:56:24 +0000
parents 93994f65c74c
children e1d228456537
comparison
equal deleted inserted replaced
2248:5cd2a2293cf0 2249:5a58b57b6724
108 } 108 }
109 109
110 #ifdef __MACOSX__ 110 #ifdef __MACOSX__
111 #include <sys/sysctl.h> 111 #include <sys/sysctl.h>
112 112
113 static SDL_bool SDL_UseAltivecPrefetch() 113 static SDL_bool
114 SDL_UseAltivecPrefetch()
114 { 115 {
115 const char key[] = "hw.l3cachesize"; 116 const char key[] = "hw.l3cachesize";
116 u_int64_t result = 0; 117 u_int64_t result = 0;
117 size_t typeSize = sizeof(result); 118 size_t typeSize = sizeof(result);
118 119
121 } else { 122 } else {
122 return SDL_FALSE; 123 return SDL_FALSE;
123 } 124 }
124 } 125 }
125 #else 126 #else
126 static SDL_bool SDL_UseAltivecPrefetch() 127 static SDL_bool
128 SDL_UseAltivecPrefetch()
127 { 129 {
128 /* Just guess G4 */ 130 /* Just guess G4 */
129 return SDL_TRUE; 131 return SDL_TRUE;
130 } 132 }
131 #endif /* __MACOSX__ */ 133 #endif /* __MACOSX__ */
132 134
133 static SDL_loblit SDL_ChooseBlitFunc(SDL_BlitEntry *entries, int count) 135 static SDL_loblit
136 SDL_ChooseBlitFunc(SDL_BlitEntry * entries, int count)
134 { 137 {
135 int i; 138 int i;
136 static Uint32 features = 0xffffffff; 139 static Uint32 features = 0xffffffff;
137 140
138 if (features == 0xffffffff) { 141 if (features == 0xffffffff) {