rdpvector.h
4.44 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
/**************************************************************************
* *
* Copyright (C) 1995, 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. *
* *
*************************************************************************/
/*
* File: rdpvector.h
* Creator: hal@sgi.com
* Create Date: Tue Sep 26 14:01:01 PDT 1995
* Purpose: Declarations & definitions common across all test modules
*
*/
/*
* A separate set of files should be modified when producing display lists for
* per module testing (e.g. cs.h, cs.c, cs_static.c). A template display list
* test has been provided; some real gfx dl's are provided as samples in the ms
* test series.
*
* TO ADD A TEST CASE:
*
* decide which module your test will focus on, then:
*
* <module_name>.h - extern the static display list, so that it is
* visible from <module_name>_static.c
*
* <module_name>_static.c - add the static display list for the test.
*
* <module_name>.c - add the procedure to be called to
* perform the test case. (also put it
* in the testCaseProc table appropriate for
* this module)
*
* - put the static display list pointer
* in the testList table (appropriately named
* for your module under test) as a Gfx pointer
* in the GfxTest_t struct; also provide a name
* for your test so that the rdpascii2rdp tool
* can provide a filename for the resulting
* binary .rdp file.
*
* plus any new textures, include files, etc.
*
*/
#define STATIC_SEGMENT 1
#define DYNAMIC_SEGMENT 2
#define TEXTURE_SEGMENT 3
#define MAX_STATIC_GFX_SIZE 256
#define MAX_GRAPHICS_SIZE 1024
#define SCREEN_HT 240
#define SCREEN_WD 320
#define STACKSIZE 0x2000
#define APP_ZBUFFER 0x00180000
/*
* ifdef needed because this file is included by "spec"
*/
#ifdef _LANGUAGE_C
#define PRINTF osSyncPrintf
/*
* Layout of our dynamic segment
*/
typedef struct {
Mtx projection;
Mtx modeling;
Mtx viewing;
Mtx identity;
Mtx torus;
Gfx glist[MAX_GRAPHICS_SIZE];
LookAt lookat[10];
Hilite hilite[10];
u16 perspNorm;
} Dynamic;
extern unsigned short zbuffer[];
extern unsigned short cfb_16_a[];
extern unsigned short cfb_16_b[];
extern Dynamic dynamic;
extern Gfx rspinit_dl[];
extern Gfx rdpinit_dl[];
extern Gfx clear_16fb_z[];
extern Gfx clear_32fb_z[];
extern Gfx clear_16fb[];
extern Gfx clear_32fb[];
extern Gfx regression_viewport[];
extern Gfx bigscreen_viewport[];
typedef void (*CaseProc_t)(Dynamic *, Gfx *);
typedef struct {
Gfx *gfx_dl; /* A pointer to the test's static (gfx) DL */
char testname[80]; /* this becomes the filename for the rdp dl */
CaseProc_t toplevel_dl; /* A pointer to the tests's top level DL */
int cfb_pixSize; /* G_IM_SIZ_16b or G_IM_SIZ_32b */
} GfxTest_t;
typedef struct {
int testListCount; /* number of tests for this module */
GfxTest_t *gfxTests; /* ptr to this module's dl's */
} ModuleTest_t;
extern Gfx *glistp; /* global for test case procs */
extern GfxTest_t testList_cs[]; /* list of per module Gfx display list tests */
extern GfxTest_t testList_ew[]; /* list of per module Gfx display list tests */
extern GfxTest_t testList_st[]; /* list of per module Gfx display list tests */
extern GfxTest_t testList_tm[]; /* list of per module Gfx display list tests */
extern GfxTest_t testList_tc[]; /* list of per module Gfx display list tests */
extern GfxTest_t testList_tf[]; /* list of per module Gfx display list tests */
extern GfxTest_t testList_cc[]; /* list of per module Gfx display list tests */
extern GfxTest_t testList_bl[]; /* list of per module Gfx display list tests */
extern GfxTest_t testList_ms[]; /* list of per module Gfx display list tests */
#endif /* _LANGUAGE_C */
#define CS_MODULE 0
#define EW_MODULE 1
#define ST_MODULE 2
#define TM_MODULE 3
#define TC_MODULE 4
#define TF_MODULE 5
#define CC_MODULE 6
#define BL_MODULE 7
#define MS_MODULE 8
#define MODULE_COUNT 9