driver.h
3.63 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
/*
* driver.h, memory structure for CC driver
*
*
*
*/
#ifndef DRIVER_INCLUDE
#define DRIVER_INCLUDE
#define DELAY_ONE 1
#define DELAY_TWO 2
#define DELAY_THREE 3
#define DELAY_FOUR 4
typedef struct {
/* required */
char *label;
int gclk_old;
int argc;
char **argv;
/* input */
int gclk;
/* output */
int st_span; /* start of span */
int ncyc; /* number of cycles per pixel */
int key_en;
int texture_edge_mode;
int cvg_times_alpha;
int alpha_cvg_select;
int cc_x_sel_0_r;
int cc_y_sel_0_r;
int cc_a_sel_0_r;
int cc_c_sel_0_r;
int cc_x_sel_0_a;
int cc_y_sel_0_a;
int cc_a_sel_0_a;
int cc_c_sel_0_a;
int cc_x_sel_1_r;
int cc_y_sel_1_r;
int cc_a_sel_1_r;
int cc_c_sel_1_r;
int cc_x_sel_1_a;
int cc_y_sel_1_a;
int cc_a_sel_1_a;
int cc_c_sel_1_a;
int st_r;
int st_g;
int st_b;
int st_a;
int tf_r;
int tf_g;
int tf_b;
int tf_a;
int tf_lod_frac;
int tf_lge1;
int prim_lod_frac;
int prim_r;
int prim_g;
int prim_b;
int prim_a;
int env_r;
int env_g;
int env_b;
int env_a;
int center_r;
int center_g;
int center_b;
int scale_r;
int scale_g;
int scale_b;
int width_r;
int width_g;
int width_b;
int k4_coeff;
int k5_coeff;
int noise;
int cvg;
int dv;
/* artificially delayed values */
int key_en_delay[DELAY_THREE];
int texture_edge_mode_delay[DELAY_THREE];
int cvg_times_alpha_delay[DELAY_THREE];
int alpha_cvg_select_delay[DELAY_THREE];
int cc_x_sel_0_r_delay[DELAY_ONE];
int cc_y_sel_0_r_delay[DELAY_ONE];
int cc_a_sel_0_r_delay[DELAY_ONE];
int cc_c_sel_0_r_delay[DELAY_ONE];
int cc_x_sel_0_a_delay[DELAY_ONE];
int cc_y_sel_0_a_delay[DELAY_ONE];
int cc_a_sel_0_a_delay[DELAY_ONE];
int cc_c_sel_0_a_delay[DELAY_ONE];
int cc_x_sel_1_r_delay[DELAY_ONE];
int cc_y_sel_1_r_delay[DELAY_ONE];
int cc_a_sel_1_r_delay[DELAY_ONE];
int cc_c_sel_1_r_delay[DELAY_ONE];
int cc_x_sel_1_a_delay[DELAY_ONE];
int cc_y_sel_1_a_delay[DELAY_ONE];
int cc_a_sel_1_a_delay[DELAY_ONE];
int cc_c_sel_1_a_delay[DELAY_ONE];
int st_r_delay[DELAY_TWO];
int st_g_delay[DELAY_TWO];
int st_b_delay[DELAY_TWO];
int st_a_delay[DELAY_TWO];
int tf_r_delay[DELAY_TWO]; /* see comments in driver code */
int tf_g_delay[DELAY_TWO]; /* "" "" */
int tf_b_delay[DELAY_TWO]; /* "" "" */
int tf_a_delay[DELAY_TWO]; /* "" "" */
int tf_lod_frac_delay[DELAY_ONE];
int tf_lge1_delay[DELAY_ONE];
int prim_lod_frac_delay[DELAY_TWO];
int prim_r_delay[DELAY_TWO];
int prim_g_delay[DELAY_TWO];
int prim_b_delay[DELAY_TWO];
int prim_a_delay[DELAY_TWO];
int env_r_delay[DELAY_TWO];
int env_g_delay[DELAY_TWO];
int env_b_delay[DELAY_TWO];
int env_a_delay[DELAY_TWO];
int center_r_delay[DELAY_TWO];
int center_g_delay[DELAY_TWO];
int center_b_delay[DELAY_TWO];
int scale_r_delay[DELAY_TWO];
int scale_g_delay[DELAY_TWO];
int scale_b_delay[DELAY_TWO];
int width_r_delay[DELAY_THREE];
int width_g_delay[DELAY_THREE];
int width_b_delay[DELAY_THREE];
int k4_coeff_delay[DELAY_TWO];
int k5_coeff_delay[DELAY_TWO];
int noise_delay[DELAY_TWO];
int cvg_delay[DELAY_THREE];
int dither_en;
int dv_delay[DELAY_FOUR];
} driver_t;
/*
* Prototypes
*/
void driver(driver_t **pp0, driver_t **pp1);
void driver_init(driver_t *p0, driver_t *p1);
#endif /* DRIVER_INCLUDE */