fix from DRI trunk
[mesa.git] / src / mesa / drivers / dri / tdfx / X86 / fx_3dnow_fastpath.S
1 /* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/X86/fx_3dnow_fastpath.S,v 1.2 2000/09/26 15:56:51 tsi Exp $ */
2
3 #include "../../X86/assyntax.h"
4
5 #define SETUP_RGBA 0x1
6 #define SETUP_TMU0 0x2
7 #define SETUP_TMU1 0x4
8
9
10 /* Pack either rgba or texture into the remaining half of a 32 byte vertex.
11 */
12 #define CLIP_R 24
13 #define CLIP_G 16
14 #define CLIP_B 20
15 #define CLIP_A 28 /* defined inf fxdrv.h */
16
17 #define CLIP_S0 16
18 #define CLIP_T0 20
19 #define CLIP_S1 24
20 #define CLIP_T1 28
21
22 #define SIZE 4
23 #define TYPE (0)
24 #define TAG(x) x
25 #include "fx_3dnow_fasttmp.h"
26
27 #define SIZE 8
28 #define TYPE (SETUP_RGBA)
29 #define TAG(x) x##_RGBA
30 #include "fx_3dnow_fasttmp.h"
31
32 #define SIZE 6
33 #define TYPE (SETUP_TMU0)
34 #define TAG(x) x##_TMU0
35 #include "fx_3dnow_fasttmp.h"
36
37 #define SIZE 8
38 #define TYPE (SETUP_TMU0|SETUP_TMU1)
39 #define TAG(x) x##_TMU0_TMU1
40 #include "fx_3dnow_fasttmp.h"
41
42 #undef CLIP_S1
43 #undef CLIP_T1
44 #define CLIP_S1 16
45 #define CLIP_T1 20
46
47 #define SIZE 6
48 #define TYPE (SETUP_TMU1)
49 #define TAG(x) x##_TMU1
50 #include "fx_3dnow_fasttmp.h"
51
52 /* These three need to use a full 64 byte clip-space vertex.
53 */
54 #undef CLIP_S0
55 #undef CLIP_T0
56 #undef CLIP_S1
57 #undef CLIP_T1
58
59 #define CLIP_S0 32
60 #define CLIP_T0 36
61 #define CLIP_S1 40
62 #define CLIP_T1 44
63
64 #define SIZE 10
65 #define TYPE (SETUP_RGBA|SETUP_TMU0)
66 #define TAG(x) x##_RGBA_TMU0
67 #include "fx_3dnow_fasttmp.h"
68
69 #define SIZE 12
70 #define TYPE (SETUP_RGBA|SETUP_TMU0|SETUP_TMU1)
71 #define TAG(x) x##_RGBA_TMU0_TMU1
72 #include "fx_3dnow_fasttmp.h"
73
74 #undef CLIP_S1
75 #undef CLIP_T1
76 #define CLIP_S1 32
77 #define CLIP_T1 36
78
79 #define SIZE 10
80 #define TYPE (SETUP_RGBA|SETUP_TMU1)
81 #define TAG(x) x##_RGBA_TMU1
82 #include "fx_3dnow_fasttmp.h"
83
84