21 #include "../SDL_internal.h"
99 return (okay ? 0 : -1);
103 #include <sys/sysctl.h>
108 const char key[] =
"hw.l3cachesize";
110 size_t typeSize =
sizeof(
result);
112 if (sysctlbyname(key, &result, &typeSize,
NULL, 0) == 0 && result > 0) {
132 static Uint32 features = 0xffffffff;
135 if (features == 0xffffffff) {
136 const char *
override =
SDL_getenv(
"SDL_BLIT_CPU_FEATURES");
166 for (i = 0; entries[
i].
func; ++
i) {
168 if (src_format != entries[i].src_format) {
171 if (dst_format != entries[i].dst_format) {
178 if ((flagcheck & entries[i].flags) != flagcheck) {
186 if ((flagcheck & entries[i].flags) != flagcheck) {
192 if ((flagcheck & entries[i].flags) != flagcheck) {
198 if ((flagcheck & entries[i].flags) != flagcheck) {
203 flagcheck = entries[
i].
cpu;
204 if ((flagcheck & features) != flagcheck) {
209 return entries[
i].
func;
271 #ifndef TEST_SLOW_BLIT