summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/tdfx/X86/fx_3dnow_fastpath.S
blob: 0f4cc45089b9129cb4ff6703b6458289dc409416 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/X86/fx_3dnow_fastpath.S,v 1.2 2000/09/26 15:56:51 tsi Exp $ */

#include "../../X86/assyntax.h"

#define SETUP_RGBA  0x1
#define SETUP_TMU0  0x2
#define SETUP_TMU1  0x4


/* Pack either rgba or texture into the remaining half of a 32 byte vertex.
 */
#define CLIP_R  24
#define CLIP_G  16
#define CLIP_B  20
#define CLIP_A  28                      /*  defined inf fxdrv.h              */

#define CLIP_S0 16
#define CLIP_T0 20
#define CLIP_S1 24
#define CLIP_T1 28

#define SIZE 4
#define TYPE (0)
#define TAG(x) x
#include "fx_3dnow_fasttmp.h"

#define SIZE 8
#define TYPE (SETUP_RGBA)
#define TAG(x) x##_RGBA
#include "fx_3dnow_fasttmp.h"

#define SIZE 6
#define TYPE (SETUP_TMU0)
#define TAG(x) x##_TMU0
#include "fx_3dnow_fasttmp.h"

#define SIZE 8
#define TYPE (SETUP_TMU0|SETUP_TMU1)
#define TAG(x) x##_TMU0_TMU1
#include "fx_3dnow_fasttmp.h"

#undef CLIP_S1
#undef CLIP_T1
#define CLIP_S1 16
#define CLIP_T1 20

#define SIZE 6
#define TYPE (SETUP_TMU1)
#define TAG(x) x##_TMU1
#include "fx_3dnow_fasttmp.h"

/* These three need to use a full 64 byte clip-space vertex.
 */
#undef CLIP_S0
#undef CLIP_T0
#undef CLIP_S1
#undef CLIP_T1

#define CLIP_S0 32
#define CLIP_T0 36
#define CLIP_S1 40
#define CLIP_T1 44

#define SIZE 10
#define TYPE (SETUP_RGBA|SETUP_TMU0)
#define TAG(x) x##_RGBA_TMU0
#include "fx_3dnow_fasttmp.h"

#define SIZE 12
#define TYPE (SETUP_RGBA|SETUP_TMU0|SETUP_TMU1)
#define TAG(x) x##_RGBA_TMU0_TMU1
#include "fx_3dnow_fasttmp.h"

#undef CLIP_S1
#undef CLIP_T1
#define CLIP_S1 32
#define CLIP_T1 36

#define SIZE 10
#define TYPE (SETUP_RGBA|SETUP_TMU1)
#define TAG(x) x##_RGBA_TMU1
#include "fx_3dnow_fasttmp.h"