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 **************************************************************************/
35 #if defined __cplusplus
44 tgsi_build_version( void );
51 tgsi_build_header( void );
54 tgsi_default_processor( void );
59 struct tgsi_header
*header
);
65 struct tgsi_declaration
66 tgsi_default_declaration( void );
68 struct tgsi_declaration
69 tgsi_build_declaration(
74 struct tgsi_header
*header
);
76 struct tgsi_full_declaration
77 tgsi_default_full_declaration( void );
80 tgsi_build_full_declaration(
81 const struct tgsi_full_declaration
*full_decl
,
82 struct tgsi_token
*tokens
,
83 struct tgsi_header
*header
,
86 struct tgsi_declaration_range
87 tgsi_default_declaration_range( void );
89 struct tgsi_declaration_range
90 tgsi_build_declaration_range(
93 struct tgsi_declaration
*declaration
,
94 struct tgsi_header
*header
);
96 struct tgsi_declaration_semantic
97 tgsi_default_declaration_semantic( void );
99 struct tgsi_declaration_semantic
100 tgsi_build_declaration_semantic(
101 unsigned semantic_name
,
102 unsigned semantic_index
,
103 struct tgsi_declaration
*declaration
,
104 struct tgsi_header
*header
);
110 struct tgsi_immediate
111 tgsi_default_immediate( void );
113 struct tgsi_immediate
114 tgsi_build_immediate(
115 struct tgsi_header
*header
);
117 struct tgsi_full_immediate
118 tgsi_default_full_immediate( void );
120 struct tgsi_immediate_float32
121 tgsi_build_immediate_float32(
123 struct tgsi_immediate
*immediate
,
124 struct tgsi_header
*header
);
127 tgsi_build_full_immediate(
128 const struct tgsi_full_immediate
*full_imm
,
129 struct tgsi_token
*tokens
,
130 struct tgsi_header
*header
,
137 struct tgsi_instruction
138 tgsi_default_instruction( void );
140 struct tgsi_instruction
141 tgsi_build_instruction(
144 unsigned num_dst_regs
,
145 unsigned num_src_regs
,
146 struct tgsi_header
*header
);
148 struct tgsi_full_instruction
149 tgsi_default_full_instruction( void );
152 tgsi_build_full_instruction(
153 const struct tgsi_full_instruction
*full_inst
,
154 struct tgsi_token
*tokens
,
155 struct tgsi_header
*header
,
158 struct tgsi_instruction_ext_nv
159 tgsi_default_instruction_ext_nv( void );
162 tgsi_compare_instruction_ext_nv(
163 struct tgsi_instruction_ext_nv a
,
164 struct tgsi_instruction_ext_nv b
);
166 struct tgsi_instruction_ext_nv
167 tgsi_build_instruction_ext_nv(
169 unsigned cond_dst_index
,
170 unsigned cond_flow_index
,
172 unsigned cond_swizzle_x
,
173 unsigned cond_swizzle_y
,
174 unsigned cond_swizzle_z
,
175 unsigned cond_swizzle_w
,
176 unsigned cond_dst_update
,
177 unsigned cond_flow_enable
,
178 struct tgsi_token
*prev_token
,
179 struct tgsi_instruction
*instruction
,
180 struct tgsi_header
*header
);
182 struct tgsi_instruction_ext_label
183 tgsi_default_instruction_ext_label( void );
186 tgsi_compare_instruction_ext_label(
187 struct tgsi_instruction_ext_label a
,
188 struct tgsi_instruction_ext_label b
);
190 struct tgsi_instruction_ext_label
191 tgsi_build_instruction_ext_label(
193 struct tgsi_token
*prev_token
,
194 struct tgsi_instruction
*instruction
,
195 struct tgsi_header
*header
);
197 struct tgsi_instruction_ext_texture
198 tgsi_default_instruction_ext_texture( void );
201 tgsi_compare_instruction_ext_texture(
202 struct tgsi_instruction_ext_texture a
,
203 struct tgsi_instruction_ext_texture b
);
205 struct tgsi_instruction_ext_texture
206 tgsi_build_instruction_ext_texture(
208 struct tgsi_token
*prev_token
,
209 struct tgsi_instruction
*instruction
,
210 struct tgsi_header
*header
);
212 struct tgsi_src_register
213 tgsi_default_src_register( void );
215 struct tgsi_src_register
216 tgsi_build_src_register(
226 struct tgsi_instruction
*instruction
,
227 struct tgsi_header
*header
);
229 struct tgsi_full_src_register
230 tgsi_default_full_src_register( void );
232 struct tgsi_src_register_ext_swz
233 tgsi_default_src_register_ext_swz( void );
236 tgsi_compare_src_register_ext_swz(
237 struct tgsi_src_register_ext_swz a
,
238 struct tgsi_src_register_ext_swz b
);
240 struct tgsi_src_register_ext_swz
241 tgsi_build_src_register_ext_swz(
242 unsigned ext_swizzle_x
,
243 unsigned ext_swizzle_y
,
244 unsigned ext_swizzle_z
,
245 unsigned ext_swizzle_w
,
250 struct tgsi_token
*prev_token
,
251 struct tgsi_instruction
*instruction
,
252 struct tgsi_header
*header
);
254 struct tgsi_src_register_ext_mod
255 tgsi_default_src_register_ext_mod( void );
258 tgsi_compare_src_register_ext_mod(
259 struct tgsi_src_register_ext_mod a
,
260 struct tgsi_src_register_ext_mod b
);
262 struct tgsi_src_register_ext_mod
263 tgsi_build_src_register_ext_mod(
269 struct tgsi_token
*prev_token
,
270 struct tgsi_instruction
*instruction
,
271 struct tgsi_header
*header
);
273 struct tgsi_dimension
274 tgsi_default_dimension( void );
276 struct tgsi_dimension
277 tgsi_build_dimension(
280 struct tgsi_instruction
*instruction
,
281 struct tgsi_header
*header
);
283 struct tgsi_dst_register
284 tgsi_default_dst_register( void );
286 struct tgsi_dst_register
287 tgsi_build_dst_register(
291 struct tgsi_instruction
*instruction
,
292 struct tgsi_header
*header
);
294 struct tgsi_full_dst_register
295 tgsi_default_full_dst_register( void );
297 struct tgsi_dst_register_ext_concode
298 tgsi_default_dst_register_ext_concode( void );
301 tgsi_compare_dst_register_ext_concode(
302 struct tgsi_dst_register_ext_concode a
,
303 struct tgsi_dst_register_ext_concode b
);
305 struct tgsi_dst_register_ext_concode
306 tgsi_build_dst_register_ext_concode(
313 struct tgsi_token
*prev_token
,
314 struct tgsi_instruction
*instruction
,
315 struct tgsi_header
*header
);
317 struct tgsi_dst_register_ext_modulate
318 tgsi_default_dst_register_ext_modulate( void );
321 tgsi_compare_dst_register_ext_modulate(
322 struct tgsi_dst_register_ext_modulate a
,
323 struct tgsi_dst_register_ext_modulate b
);
325 struct tgsi_dst_register_ext_modulate
326 tgsi_build_dst_register_ext_modulate(
328 struct tgsi_token
*prev_token
,
329 struct tgsi_instruction
*instruction
,
330 struct tgsi_header
*header
);
332 #if defined __cplusplus
336 #endif /* TGSI_BUILD_H */