perf.h
4.3 KB
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
/**************************************************************************
* *
* Copyright (C) 1994, Silicon Graphics, Inc. *
* *
* These coded instructions, statements, and computer programs contain *
* unpublished proprietary information of Silicon Graphics, Inc., and *
* are protected by Federal copyright law. They may not be disclosed *
* to third parties or copied or duplicated in any form, in whole or *
* in part, without the prior written consent of Silicon Graphics, Inc. *
* *
*************************************************************************/
#define STATIC_SEGMENT 1
#define DYNAMIC_SEGMENT 2
#define MAX_STATIC_GFX_SIZE 256
#define SCREEN_HT 240
#define SCREEN_WD 320
#define STACKSIZE 0x4000
#if 0
#define MRDPBUFF 307299
#define MAXGLIST 12800
#define MAXTRI 10
#else
#define MRDPBUFF 65536
#define MAXGLIST 253000 /* 385000 */
#define MAXTRI 10
#endif
#define RDRAM 1
#define XBUS 0
#ifdef _LANGUAGE_C
#define PRINTF osSyncPrintf
extern float TICKSPERSEC;
extern unsigned short RGBA16cbar[];
typedef struct {
Mtx projection;
Mtx modeling;
Vtx border[4];
Vtx v[MAXTRI * 3];
Gfx glist[MAXGLIST];
} Dynamic;
extern Gfx *glistp; /* global for test case procs */
extern unsigned short cfb_16_a[];
extern unsigned short zbuffer[];
extern unsigned int foobarblech;
extern int verbose;
extern int rdp_DRAM_io;
extern int OutputRSP;
extern int OutputRDP;
extern int OutputMEM;
extern int debugger;
extern int verbose;
extern int timing;
extern int TestKind;
extern int TestKind;
extern int TestFuncNum;
extern int FrameRate;
extern int HangAfterDump;
extern int UseSmallTri;
extern int LoopTestFuncNum;
extern int UseAAMode;
extern int UseZMode;
extern int ClearScreen;
extern int ClearZBuffer;
extern u32 dummy_val;
#define V(p, x, y, z, f, s, t, r, g, b, a) { \
(p)->v.ob[0] = (x); \
(p)->v.ob[1] = (y); \
(p)->v.ob[2] = (z); \
(p)->v.flag = (f); \
(p)->v.tc[0] = (s); \
(p)->v.tc[1] = (t); \
(p)->v.cn[0] = (r); \
(p)->v.cn[1] = (g); \
(p)->v.cn[2] = (b); \
(p)->v.cn[3] = (a); \
}
typedef struct
{
void (*TestFunctionPtr)(Dynamic *);
void (*TestPrintPtr)(OSTime);
void (*ControllerFunc)(void);
u32 ClearGeometryMode;
u32 SetGeometryMode;
} TestStruct;
#define R(y) (xrand()%(y))
#define BORDER 200
extern int cfb_size;
extern void *cfb_ptrs[1];
extern int current;
extern int framecount;
extern OSMesgQueue dmaMessageQ, rspMessageQ, rdpMessageQ, retraceMessageQ;
extern OSMesg dmaMessageBuf, rspMessageBuf, rdpMessageBuf, retraceMessageBuf;
extern OSMesg dummyMessage;
extern OSIoMesg dmaIOMessageBuf;
extern char *staticSegment;
extern OSMesg dummyMesg;
extern OSTask *tlistp;
extern Dynamic *dynamicp;
extern char _codeSegmentEnd[];
extern char _dynamicSegmentEnd[];
/* these are fixed sizes: */
#define SP_UCODE_SIZE 4096
#define SP_UCODE_DATA_SIZE 2048
/*
* Symbols generated by "makerom" to tell us where the static segment is
* in ROM.
*/
extern char _staticSegmentRomStart[], _staticSegmentRomEnd[];
extern OSTask tlist[2]; /* globaltask lists */
extern Gfx *glistp; /* global for test case procs */
extern Dynamic dynamicBuffer[1];
extern u64 dram_yield[OS_YIELD_DATA_SIZE/sizeof(u64)];
extern unsigned long long int dram_stack[SP_DRAM_STACK_SIZE64];
extern u64 rdp_output_len;
extern u64 rdp_output[];
#define DEFAULTCLEARMODE G_SHADE|G_LIGHTING|G_SHADING_SMOOTH|G_ZBUFFER|G_TEXTURE_GEN|G_FOG|G_LOD|G_CULL_BOTH
void CreateMessageQueues(void);
void DMAStaticSegment(void);
void SetupViSwapBuffer(void);
void CreateTaskStructure(void);
void SetupSegments(void);
void clearFrameBuffer(void);
void clearZBuffer(int);
void rdpInit(void);
void rspInit(Dynamic *, Vtx *, TestStruct *);
void doRDP(void *);
void doRSP(void *);
void doMonkey(void *);
#endif /* _LANGUAGE_C */