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(
76 struct tgsi_header
*header
);
78 struct tgsi_full_declaration
79 tgsi_default_full_declaration( void );
82 tgsi_build_full_declaration(
83 const struct tgsi_full_declaration
*full_decl
,
84 struct tgsi_token
*tokens
,
85 struct tgsi_header
*header
,
88 struct tgsi_declaration_range
89 tgsi_default_declaration_range( void );
91 struct tgsi_declaration_range
92 tgsi_build_declaration_range(
95 struct tgsi_declaration
*declaration
,
96 struct tgsi_header
*header
);
98 struct tgsi_declaration_semantic
99 tgsi_default_declaration_semantic( void );
101 struct tgsi_declaration_semantic
102 tgsi_build_declaration_semantic(
103 unsigned semantic_name
,
104 unsigned semantic_index
,
105 struct tgsi_declaration
*declaration
,
106 struct tgsi_header
*header
);
112 struct tgsi_immediate
113 tgsi_default_immediate( void );
115 struct tgsi_immediate
116 tgsi_build_immediate(
117 struct tgsi_header
*header
);
119 struct tgsi_full_immediate
120 tgsi_default_full_immediate( void );
122 union tgsi_immediate_data
123 tgsi_build_immediate_float32(
125 struct tgsi_immediate
*immediate
,
126 struct tgsi_header
*header
);
129 tgsi_build_full_immediate(
130 const struct tgsi_full_immediate
*full_imm
,
131 struct tgsi_token
*tokens
,
132 struct tgsi_header
*header
,
139 struct tgsi_instruction
140 tgsi_default_instruction( void );
142 struct tgsi_instruction
143 tgsi_build_instruction(
146 unsigned num_dst_regs
,
147 unsigned num_src_regs
,
148 struct tgsi_header
*header
);
150 struct tgsi_full_instruction
151 tgsi_default_full_instruction( void );
154 tgsi_build_full_instruction(
155 const struct tgsi_full_instruction
*full_inst
,
156 struct tgsi_token
*tokens
,
157 struct tgsi_header
*header
,
160 struct tgsi_instruction_ext_label
161 tgsi_default_instruction_ext_label( void );
164 tgsi_compare_instruction_ext_label(
165 struct tgsi_instruction_ext_label a
,
166 struct tgsi_instruction_ext_label b
);
168 struct tgsi_instruction_ext_label
169 tgsi_build_instruction_ext_label(
171 struct tgsi_token
*prev_token
,
172 struct tgsi_instruction
*instruction
,
173 struct tgsi_header
*header
);
175 struct tgsi_instruction_ext_texture
176 tgsi_default_instruction_ext_texture( void );
179 tgsi_compare_instruction_ext_texture(
180 struct tgsi_instruction_ext_texture a
,
181 struct tgsi_instruction_ext_texture b
);
183 struct tgsi_instruction_ext_texture
184 tgsi_build_instruction_ext_texture(
186 struct tgsi_token
*prev_token
,
187 struct tgsi_instruction
*instruction
,
188 struct tgsi_header
*header
);
190 struct tgsi_instruction_ext_predicate
191 tgsi_default_instruction_ext_predicate(void);
194 tgsi_compare_instruction_ext_predicate(struct tgsi_instruction_ext_predicate a
,
195 struct tgsi_instruction_ext_predicate b
);
197 struct tgsi_instruction_ext_predicate
198 tgsi_build_instruction_ext_predicate(unsigned index
,
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_mod
229 tgsi_default_src_register_ext_mod( void );
232 tgsi_compare_src_register_ext_mod(
233 struct tgsi_src_register_ext_mod a
,
234 struct tgsi_src_register_ext_mod b
);
236 struct tgsi_src_register_ext_mod
237 tgsi_build_src_register_ext_mod(
243 struct tgsi_token
*prev_token
,
244 struct tgsi_instruction
*instruction
,
245 struct tgsi_header
*header
);
247 struct tgsi_dimension
248 tgsi_default_dimension( void );
250 struct tgsi_dimension
251 tgsi_build_dimension(
254 struct tgsi_instruction
*instruction
,
255 struct tgsi_header
*header
);
257 struct tgsi_dst_register
258 tgsi_default_dst_register( void );
260 struct tgsi_dst_register
261 tgsi_build_dst_register(
266 struct tgsi_instruction
*instruction
,
267 struct tgsi_header
*header
);
269 struct tgsi_full_dst_register
270 tgsi_default_full_dst_register( void );
272 struct tgsi_dst_register_ext_modulate
273 tgsi_default_dst_register_ext_modulate( void );
276 tgsi_compare_dst_register_ext_modulate(
277 struct tgsi_dst_register_ext_modulate a
,
278 struct tgsi_dst_register_ext_modulate b
);
280 struct tgsi_dst_register_ext_modulate
281 tgsi_build_dst_register_ext_modulate(
283 struct tgsi_token
*prev_token
,
284 struct tgsi_instruction
*instruction
,
285 struct tgsi_header
*header
);
287 #if defined __cplusplus
291 #endif /* TGSI_BUILD_H */