annotate cpudetect.h @ 10578:b9d289fd8a57

10000l, the old code was slow as hell, copying stuff extra times and actually broken -- blanking the whole screen at each 'page flip' with -dr enabled. benchmarks: before: 56% cpu for decode 56% cpu for vo with no -dr 25% cpu for vo with -dr after: 56% cpu for decode 25% cpu for vo without -dr 0% cpu for vo with -dr if vo_fbdev is going to do pageflip, it needs to do it for REAL, using vertical scroll registers (like g2), not copying a temp buffer (which will shear anyway and is super-slow).
author rfelker
date Tue, 12 Aug 2003 08:24:24 +0000
parents c428933c7e54
children 685c416f12b5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3146
3164eaa93396 non x86 fix (otherwise we would need #ifdef ARCH_X86 around every if(gCpuCaps.has...))
michael
parents: 2303
diff changeset
1 #ifndef CPUDETECT_H
3164eaa93396 non x86 fix (otherwise we would need #ifdef ARCH_X86 around every if(gCpuCaps.has...))
michael
parents: 2303
diff changeset
2 #define CPUDETECT_H
2268
72ff2179d396 cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff changeset
3
2281
arpi
parents: 2280
diff changeset
4 #define CPUTYPE_I386 3
arpi
parents: 2280
diff changeset
5 #define CPUTYPE_I486 4
arpi
parents: 2280
diff changeset
6 #define CPUTYPE_I586 5
arpi
parents: 2280
diff changeset
7 #define CPUTYPE_I686 6
2268
72ff2179d396 cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff changeset
8
72ff2179d396 cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff changeset
9 typedef struct cpucaps_s {
72ff2179d396 cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff changeset
10 int cpuType;
3403
c4ca766a2d05 added cpuStepping to CpuCaps struct (needed win32.c)
alex
parents: 3146
diff changeset
11 int cpuStepping;
2268
72ff2179d396 cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff changeset
12 int hasMMX;
72ff2179d396 cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff changeset
13 int hasMMX2;
72ff2179d396 cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff changeset
14 int has3DNow;
72ff2179d396 cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff changeset
15 int has3DNowExt;
72ff2179d396 cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff changeset
16 int hasSSE;
72ff2179d396 cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff changeset
17 int hasSSE2;
3146
3164eaa93396 non x86 fix (otherwise we would need #ifdef ARCH_X86 around every if(gCpuCaps.has...))
michael
parents: 2303
diff changeset
18 int isX86;
8860
778989dba3a2 cpu cache line length detection
arpi
parents: 3403
diff changeset
19 unsigned cl_size; /* size of cache line */
9003
c428933c7e54 AltiVec detection code ("borrowed" from FFmpeg and
arpi
parents: 8860
diff changeset
20 int hasAltiVec;
2268
72ff2179d396 cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff changeset
21 } CpuCaps;
72ff2179d396 cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff changeset
22
72ff2179d396 cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff changeset
23 extern CpuCaps gCpuCaps;
72ff2179d396 cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff changeset
24
2301
b4c4c832cce7 Detect and show cpu name.
atmos4
parents: 2281
diff changeset
25 void GetCpuCaps(CpuCaps *caps);
2303
456e22bfb147 returns a malloc()'ed string instead of an auto char[]
pl
parents: 2301
diff changeset
26
456e22bfb147 returns a malloc()'ed string instead of an auto char[]
pl
parents: 2301
diff changeset
27 /* returned value is malloc()'ed so free() it after use */
2301
b4c4c832cce7 Detect and show cpu name.
atmos4
parents: 2281
diff changeset
28 char *GetCpuFriendlyName(unsigned int regs[], unsigned int regs2[]);
2268
72ff2179d396 cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff changeset
29
3146
3164eaa93396 non x86 fix (otherwise we would need #ifdef ARCH_X86 around every if(gCpuCaps.has...))
michael
parents: 2303
diff changeset
30 #endif /* !CPUDETECT_H */
2301
b4c4c832cce7 Detect and show cpu name.
atmos4
parents: 2281
diff changeset
31