tf.h
2.87 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
/*
* tf.h -- texture filter unit
*
* types and macros
*
*/
#ifndef TF_UNIT_INCLD
#define TF_UNIT_INCLD
typedef struct tf
{
/* R E Q U I R E D by C-sim */
char *label;
char **argv;
int argc;
int gclk_old;
/* I N P U T signals (must be int) */
int gclk; /* gated clock */
int st_span; /* start of span */
int ncyc; /* number of cycles per pixel */
int bilerp0m; /* cycle 0 mode bit */
int bilerp1m; /* cycle 1 mode bit */
int convert_one; /* loopback mode */
int mid_texel; /* mid mode (for 4 texel avg) */
int k0_coeff; /* [8:0], color convert coeffs */
int k1_coeff; /* [8:0], color convert coeffs */
int k2_coeff; /* [8:0], color convert coeffs */
int k3_coeff; /* [8:0], color convert coeffs */
int lod_frac; /* [8:0], s,8.0, pipe through to CCU */
int lge1; /* lod >= 1.0 */
int sfrac_rg; /* [7:0], 0.8, bilerp alphas */
int tfrac_rg; /* [7:0], 0.8, bilerp alphas */
int sfrac_ba; /* [7:0], 0.8, bilerp alphas */
int tfrac_ba; /* [7:0], 0.8, bilerp alphas */
int tm_ra; /* [8:0], s,8.0, texel A */
int tm_ga;
int tm_ba;
int tm_aa;
int tm_rb; /* [8:0], s,8.0, texel B */
int tm_gb;
int tm_bb;
int tm_ab;
int tm_rc; /* [8:0], s,8.0, texel C */
int tm_gc;
int tm_bc;
int tm_ac;
int tm_rd; /* [8:0], s,8.0, texel D */
int tm_gd;
int tm_bd;
int tm_ad;
/* O U T P U T signals (must be int) */
int tf_r; /* [8:0], s,8.0, filtered texel */
int tf_g;
int tf_b;
int tf_a;
int tf_lod_frac; /* [8:0], s,8.0, delayed lod fraction */
int tf_lge1; /* delayed lod >= 1.0 signal */
/* O T H E R signals */
unsigned int cycle: 1;
unsigned int loop_d1: 1;
unsigned int lod_frac_d1: 9;
unsigned int lge1_d1: 9;
/* red channel */
unsigned int txtrb_d1: 9; /* s,8 */
unsigned int xar: 9;
unsigned int yar: 9;
unsigned int xbr: 9;
unsigned int ybr: 9;
unsigned int txtr_sfuv_d1: 9;
unsigned int txtg_tfuv_d1: 9;
unsigned int por: 9;
unsigned int ptr: 9;
/* green channel */
unsigned int txtgb_d1: 9;
unsigned int xag: 9;
unsigned int yag: 9;
unsigned int xbg: 9;
unsigned int ybg: 9;
unsigned int pog: 9;
unsigned int ptg: 9;
/* blue channel */
unsigned int txtb_d1: 9;
unsigned int xab: 9;
unsigned int yab: 9;
unsigned int xbb: 9;
unsigned int ybb: 9;
unsigned int txtr_sfy_d1: 9;
unsigned int txtg_tfy_d1: 9;
unsigned int pob: 9;
unsigned int ptb: 9;
/* alpha channel */
unsigned int txta_d1: 9;
unsigned int xaa: 9;
unsigned int yaa: 9;
unsigned int xba: 9;
unsigned int yba: 9;
unsigned int poa: 9;
unsigned int pta: 9;
} tf_t;
/*
* P r o t o t y p e s
*/
void tf(tf_t **pp0, tf_t **pp1);
void tf_init(tf_t *p0, tf_t *p1);
#endif /* TF_UNIT_INCLD */