summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/tgsi/core/tgsi_build.h
blob: 35c1a2506d2eef51e36f8e0455965d8a566be856 (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
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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
#if !defined TGSI_BUILD_H
#define TGSI_BUILD_H

#if defined __cplusplus
extern "C" {
#endif // defined __cplusplus

/*
 * version
 */

struct tgsi_version
tgsi_build_version( void );

/*
 * header
 */

struct tgsi_header
tgsi_build_header( void );

struct tgsi_processor
tgsi_default_processor( void );

struct tgsi_processor
tgsi_build_processor(
   GLuint processor,
   struct tgsi_header *header );

/*
 * declaration
 */

struct tgsi_declaration
tgsi_default_declaration( void );

struct tgsi_declaration
tgsi_build_declaration(
   GLuint file,
   GLuint declare,
   GLuint interpolate,
   struct tgsi_header *header );

struct tgsi_full_declaration
tgsi_default_full_declaration( void );

GLuint
tgsi_build_full_declaration(
   const struct tgsi_full_declaration *full_decl,
   struct tgsi_token *tokens,
   struct tgsi_header *header,
   GLuint maxsize );

struct tgsi_declaration_range
tgsi_build_declaration_range(
   GLuint first,
   GLuint last,
   struct tgsi_declaration *declaration,
   struct tgsi_header *header );

struct tgsi_declaration_mask
tgsi_build_declaration_mask(
   GLuint mask,
   struct tgsi_declaration *declaration,
   struct tgsi_header *header );

struct tgsi_declaration_interpolation
tgsi_default_declaration_interpolation( void );

struct tgsi_declaration_interpolation
tgsi_build_declaration_interpolation(
   GLuint interpolate,
   struct tgsi_declaration *declaration,
   struct tgsi_header *header );

/*
 * immediate
 */

struct tgsi_immediate
tgsi_default_immediate( void );

struct tgsi_immediate
tgsi_build_immediate(
   struct tgsi_header *header );

struct tgsi_full_immediate
tgsi_default_full_immediate( void );

struct tgsi_immediate_float32
tgsi_build_immediate_float32(
   GLfloat value,
   struct tgsi_immediate *immediate,
   struct tgsi_header *header );

GLuint
tgsi_build_full_immediate(
   const struct tgsi_full_immediate *full_imm,
   struct tgsi_token *tokens,
   struct tgsi_header *header,
   GLuint maxsize );

/*
 * instruction
 */

struct tgsi_instruction
tgsi_default_instruction( void );

struct tgsi_instruction
tgsi_build_instruction(
   GLuint opcode,
   GLuint saturate,
   GLuint num_dst_regs,
   GLuint num_src_regs,
   struct tgsi_header *header );

struct tgsi_full_instruction
tgsi_default_full_instruction( void );

GLuint
tgsi_build_full_instruction(
   const struct tgsi_full_instruction *full_inst,
   struct tgsi_token *tokens,
   struct tgsi_header *header,
   GLuint maxsize );

struct tgsi_instruction_ext_nv
tgsi_default_instruction_ext_nv( void );

GLuint
tgsi_compare_instruction_ext_nv(
   struct tgsi_instruction_ext_nv a,
   struct tgsi_instruction_ext_nv b );

struct tgsi_instruction_ext_nv
tgsi_build_instruction_ext_nv(
   GLuint precision,
   GLuint cond_dst_index,
   GLuint cond_flow_index,
   GLuint cond_mask,
   GLuint cond_swizzle_x,
   GLuint cond_swizzle_y,
   GLuint cond_swizzle_z,
   GLuint cond_swizzle_w,
   GLuint cond_dst_update,
   GLuint cond_flow_update,
   struct tgsi_token *prev_token,
   struct tgsi_instruction *instruction,
   struct tgsi_header *header );

struct tgsi_instruction_ext_label
tgsi_default_instruction_ext_label( void );

GLuint
tgsi_compare_instruction_ext_label(
   struct tgsi_instruction_ext_label a,
   struct tgsi_instruction_ext_label b );

struct tgsi_instruction_ext_label
tgsi_build_instruction_ext_label(
   GLuint label,
   struct tgsi_token *prev_token,
   struct tgsi_instruction *instruction,
   struct tgsi_header *header );

struct tgsi_instruction_ext_texture
tgsi_default_instruction_ext_texture( void );

GLuint
tgsi_compare_instruction_ext_texture(
   struct tgsi_instruction_ext_texture a,
   struct tgsi_instruction_ext_texture b );

struct tgsi_instruction_ext_texture
tgsi_build_instruction_ext_texture(
   GLuint texture,
   struct tgsi_token *prev_token,
   struct tgsi_instruction *instruction,
   struct tgsi_header *header );

struct tgsi_src_register
tgsi_default_src_register( void );

struct tgsi_src_register
tgsi_build_src_register(
   GLuint file,
   GLuint swizzle_x,
   GLuint swizzle_y,
   GLuint swizzle_z,
   GLuint swizzle_w,
   GLuint negate,
   GLuint indirect,
   GLuint dimension,
   GLint index,
   struct tgsi_instruction *instruction,
   struct tgsi_header *header );

struct tgsi_full_src_register
tgsi_default_full_src_register( void );

struct tgsi_src_register_ext_swz
tgsi_default_src_register_ext_swz( void );

GLuint
tgsi_compare_src_register_ext_swz(
   struct tgsi_src_register_ext_swz a,
   struct tgsi_src_register_ext_swz b );

struct tgsi_src_register_ext_swz
tgsi_build_src_register_ext_swz(
   GLuint ext_swizzle_x,
   GLuint ext_swizzle_y,
   GLuint ext_swizzle_z,
   GLuint ext_swizzle_w,
   GLuint negate_x,
   GLuint negate_y,
   GLuint negate_z,
   GLuint negate_w,
   GLuint ext_divide,
   struct tgsi_token *prev_token,
   struct tgsi_instruction *instruction,
   struct tgsi_header *header );

struct tgsi_src_register_ext_mod
tgsi_default_src_register_ext_mod( void );

GLuint
tgsi_compare_src_register_ext_mod(
   struct tgsi_src_register_ext_mod a,
   struct tgsi_src_register_ext_mod b );

struct tgsi_src_register_ext_mod
tgsi_build_src_register_ext_mod(
   GLuint complement,
   GLuint bias,
   GLuint scale_2x,
   GLuint absolute,
   GLuint negate,
   struct tgsi_token *prev_token,
   struct tgsi_instruction *instruction,
   struct tgsi_header *header );

struct tgsi_dimension
tgsi_default_dimension( void );

struct tgsi_dimension
tgsi_build_dimension(
   GLuint indirect,
   GLuint index,
   struct tgsi_instruction *instruction,
   struct tgsi_header *header );

struct tgsi_dst_register
tgsi_default_dst_register( void );

struct tgsi_dst_register
tgsi_build_dst_register(
   GLuint file,
   GLuint mask,
   GLint index,
   struct tgsi_instruction *instruction,
   struct tgsi_header *header );

struct tgsi_full_dst_register
tgsi_default_full_dst_register( void );

struct tgsi_dst_register_ext_concode
tgsi_default_dst_register_ext_concode( void );

GLuint
tgsi_compare_dst_register_ext_concode(
   struct tgsi_dst_register_ext_concode a,
   struct tgsi_dst_register_ext_concode b );

struct tgsi_dst_register_ext_concode
tgsi_build_dst_register_ext_concode(
   GLuint cc,
   GLuint swizzle_x,
   GLuint swizzle_y,
   GLuint swizzle_z,
   GLuint swizzle_w,
   GLint index,
   struct tgsi_token *prev_token,
   struct tgsi_instruction *instruction,
   struct tgsi_header *header );

struct tgsi_dst_register_ext_modulate
tgsi_default_dst_register_ext_modulate( void );

GLuint
tgsi_compare_dst_register_ext_modulate(
   struct tgsi_dst_register_ext_modulate a,
   struct tgsi_dst_register_ext_modulate b );

struct tgsi_dst_register_ext_modulate
tgsi_build_dst_register_ext_modulate(
   GLuint modulate,
   struct tgsi_token *prev_token,
   struct tgsi_instruction *instruction,
   struct tgsi_header *header );

#if defined __cplusplus
} // extern "C"
#endif // defined __cplusplus

#endif // !defined TGSI_BUILD_H