1 /**************************************************************************
3 * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the
8 * "Software"), to deal in the Software without restriction, including
9 * without limitation the rights to use, copy, modify, merge, publish,
10 * distribute, sub license, and/or sell copies of the Software, and to
11 * permit persons to whom the Software is furnished to do so, subject to
12 * the following conditions:
14 * The above copyright notice and this permission notice (including the
15 * next paragraph) shall be included in all copies or substantial portions
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
21 * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
22 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26 **************************************************************************/
31 #if defined __cplusplus
40 tgsi_build_version( void );
47 tgsi_build_header( void );
50 tgsi_default_processor( void );
55 struct tgsi_header
*header
);
61 struct tgsi_declaration
62 tgsi_default_declaration( void );
64 struct tgsi_declaration
65 tgsi_build_declaration(
70 struct tgsi_header
*header
);
72 struct tgsi_full_declaration
73 tgsi_default_full_declaration( void );
76 tgsi_build_full_declaration(
77 const struct tgsi_full_declaration
*full_decl
,
78 struct tgsi_token
*tokens
,
79 struct tgsi_header
*header
,
82 struct tgsi_declaration_range
83 tgsi_default_declaration_range( void );
85 struct tgsi_declaration_range
86 tgsi_build_declaration_range(
89 struct tgsi_declaration
*declaration
,
90 struct tgsi_header
*header
);
92 struct tgsi_declaration_semantic
93 tgsi_default_declaration_semantic( void );
95 struct tgsi_declaration_semantic
96 tgsi_build_declaration_semantic(
97 unsigned semantic_name
,
98 unsigned semantic_index
,
99 struct tgsi_declaration
*declaration
,
100 struct tgsi_header
*header
);
106 struct tgsi_immediate
107 tgsi_default_immediate( void );
109 struct tgsi_immediate
110 tgsi_build_immediate(
111 struct tgsi_header
*header
);
113 struct tgsi_full_immediate
114 tgsi_default_full_immediate( void );
116 struct tgsi_immediate_float32
117 tgsi_build_immediate_float32(
119 struct tgsi_immediate
*immediate
,
120 struct tgsi_header
*header
);
123 tgsi_build_full_immediate(
124 const struct tgsi_full_immediate
*full_imm
,
125 struct tgsi_token
*tokens
,
126 struct tgsi_header
*header
,
133 struct tgsi_instruction
134 tgsi_default_instruction( void );
136 struct tgsi_instruction
137 tgsi_build_instruction(
140 unsigned num_dst_regs
,
141 unsigned num_src_regs
,
142 struct tgsi_header
*header
);
144 struct tgsi_full_instruction
145 tgsi_default_full_instruction( void );
148 tgsi_build_full_instruction(
149 const struct tgsi_full_instruction
*full_inst
,
150 struct tgsi_token
*tokens
,
151 struct tgsi_header
*header
,
154 struct tgsi_instruction_ext_nv
155 tgsi_default_instruction_ext_nv( void );
158 tgsi_compare_instruction_ext_nv(
159 struct tgsi_instruction_ext_nv a
,
160 struct tgsi_instruction_ext_nv b
);
162 struct tgsi_instruction_ext_nv
163 tgsi_build_instruction_ext_nv(
165 unsigned cond_dst_index
,
166 unsigned cond_flow_index
,
168 unsigned cond_swizzle_x
,
169 unsigned cond_swizzle_y
,
170 unsigned cond_swizzle_z
,
171 unsigned cond_swizzle_w
,
172 unsigned cond_dst_update
,
173 unsigned cond_flow_update
,
174 struct tgsi_token
*prev_token
,
175 struct tgsi_instruction
*instruction
,
176 struct tgsi_header
*header
);
178 struct tgsi_instruction_ext_label
179 tgsi_default_instruction_ext_label( void );
182 tgsi_compare_instruction_ext_label(
183 struct tgsi_instruction_ext_label a
,
184 struct tgsi_instruction_ext_label b
);
186 struct tgsi_instruction_ext_label
187 tgsi_build_instruction_ext_label(
189 struct tgsi_token
*prev_token
,
190 struct tgsi_instruction
*instruction
,
191 struct tgsi_header
*header
);
193 struct tgsi_instruction_ext_texture
194 tgsi_default_instruction_ext_texture( void );
197 tgsi_compare_instruction_ext_texture(
198 struct tgsi_instruction_ext_texture a
,
199 struct tgsi_instruction_ext_texture b
);
201 struct tgsi_instruction_ext_texture
202 tgsi_build_instruction_ext_texture(
204 struct tgsi_token
*prev_token
,
205 struct tgsi_instruction
*instruction
,
206 struct tgsi_header
*header
);
208 struct tgsi_src_register
209 tgsi_default_src_register( void );
211 struct tgsi_src_register
212 tgsi_build_src_register(
222 struct tgsi_instruction
*instruction
,
223 struct tgsi_header
*header
);
225 struct tgsi_full_src_register
226 tgsi_default_full_src_register( void );
228 struct tgsi_src_register_ext_swz
229 tgsi_default_src_register_ext_swz( void );
232 tgsi_compare_src_register_ext_swz(
233 struct tgsi_src_register_ext_swz a
,
234 struct tgsi_src_register_ext_swz b
);
236 struct tgsi_src_register_ext_swz
237 tgsi_build_src_register_ext_swz(
238 unsigned ext_swizzle_x
,
239 unsigned ext_swizzle_y
,
240 unsigned ext_swizzle_z
,
241 unsigned ext_swizzle_w
,
246 struct tgsi_token
*prev_token
,
247 struct tgsi_instruction
*instruction
,
248 struct tgsi_header
*header
);
250 struct tgsi_src_register_ext_mod
251 tgsi_default_src_register_ext_mod( void );
254 tgsi_compare_src_register_ext_mod(
255 struct tgsi_src_register_ext_mod a
,
256 struct tgsi_src_register_ext_mod b
);
258 struct tgsi_src_register_ext_mod
259 tgsi_build_src_register_ext_mod(
265 struct tgsi_token
*prev_token
,
266 struct tgsi_instruction
*instruction
,
267 struct tgsi_header
*header
);
269 struct tgsi_dimension
270 tgsi_default_dimension( void );
272 struct tgsi_dimension
273 tgsi_build_dimension(
276 struct tgsi_instruction
*instruction
,
277 struct tgsi_header
*header
);
279 struct tgsi_dst_register
280 tgsi_default_dst_register( void );
282 struct tgsi_dst_register
283 tgsi_build_dst_register(
287 struct tgsi_instruction
*instruction
,
288 struct tgsi_header
*header
);
290 struct tgsi_full_dst_register
291 tgsi_default_full_dst_register( void );
293 struct tgsi_dst_register_ext_concode
294 tgsi_default_dst_register_ext_concode( void );
297 tgsi_compare_dst_register_ext_concode(
298 struct tgsi_dst_register_ext_concode a
,
299 struct tgsi_dst_register_ext_concode b
);
301 struct tgsi_dst_register_ext_concode
302 tgsi_build_dst_register_ext_concode(
309 struct tgsi_token
*prev_token
,
310 struct tgsi_instruction
*instruction
,
311 struct tgsi_header
*header
);
313 struct tgsi_dst_register_ext_modulate
314 tgsi_default_dst_register_ext_modulate( void );
317 tgsi_compare_dst_register_ext_modulate(
318 struct tgsi_dst_register_ext_modulate a
,
319 struct tgsi_dst_register_ext_modulate b
);
321 struct tgsi_dst_register_ext_modulate
322 tgsi_build_dst_register_ext_modulate(
324 struct tgsi_token
*prev_token
,
325 struct tgsi_instruction
*instruction
,
326 struct tgsi_header
*header
);
328 #if defined __cplusplus
332 #endif /* TGSI_BUILD_H */