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
45 tgsi_build_header( void );
48 tgsi_default_processor( void );
53 struct tgsi_header
*header
);
59 struct tgsi_declaration
60 tgsi_default_declaration( void );
62 struct tgsi_declaration
63 tgsi_build_declaration(
71 struct tgsi_header
*header
);
73 struct tgsi_full_declaration
74 tgsi_default_full_declaration( void );
77 tgsi_build_full_declaration(
78 const struct tgsi_full_declaration
*full_decl
,
79 struct tgsi_token
*tokens
,
80 struct tgsi_header
*header
,
83 struct tgsi_declaration_range
84 tgsi_default_declaration_range( void );
86 struct tgsi_declaration_range
87 tgsi_build_declaration_range(
90 struct tgsi_declaration
*declaration
,
91 struct tgsi_header
*header
);
93 struct tgsi_declaration_dimension
94 tgsi_default_declaration_dimension(void);
96 struct tgsi_declaration_dimension
97 tgsi_build_declaration_dimension(unsigned index_2d
,
98 struct tgsi_declaration
*declaration
,
99 struct tgsi_header
*header
);
101 struct tgsi_declaration_semantic
102 tgsi_default_declaration_semantic( void );
104 struct tgsi_declaration_semantic
105 tgsi_build_declaration_semantic(
106 unsigned semantic_name
,
107 unsigned semantic_index
,
108 struct tgsi_declaration
*declaration
,
109 struct tgsi_header
*header
);
115 struct tgsi_immediate
116 tgsi_default_immediate( void );
118 struct tgsi_immediate
119 tgsi_build_immediate(
120 struct tgsi_header
*header
);
122 struct tgsi_full_immediate
123 tgsi_default_full_immediate( void );
125 union tgsi_immediate_data
126 tgsi_build_immediate_float32(
128 struct tgsi_immediate
*immediate
,
129 struct tgsi_header
*header
);
132 tgsi_build_full_immediate(
133 const struct tgsi_full_immediate
*full_imm
,
134 struct tgsi_token
*tokens
,
135 struct tgsi_header
*header
,
143 tgsi_default_property( void );
147 unsigned property_name
,
148 struct tgsi_header
*header
);
150 struct tgsi_full_property
151 tgsi_default_full_property( void );
153 struct tgsi_property_data
154 tgsi_build_property_data(
156 struct tgsi_property
*property
,
157 struct tgsi_header
*header
);
160 tgsi_build_full_property(
161 const struct tgsi_full_property
*full_prop
,
162 struct tgsi_token
*tokens
,
163 struct tgsi_header
*header
,
170 struct tgsi_instruction
171 tgsi_default_instruction( void );
173 struct tgsi_instruction
174 tgsi_build_instruction(
178 unsigned num_dst_regs
,
179 unsigned num_src_regs
,
180 struct tgsi_header
*header
);
182 struct tgsi_full_instruction
183 tgsi_default_full_instruction( void );
186 tgsi_build_full_instruction(
187 const struct tgsi_full_instruction
*full_inst
,
188 struct tgsi_token
*tokens
,
189 struct tgsi_header
*header
,
192 struct tgsi_instruction_predicate
193 tgsi_default_instruction_predicate(void);
195 struct tgsi_instruction_predicate
196 tgsi_build_instruction_predicate(int index
,
202 struct tgsi_instruction
*instruction
,
203 struct tgsi_header
*header
);
205 struct tgsi_instruction_label
206 tgsi_default_instruction_label( void );
208 struct tgsi_instruction_label
209 tgsi_build_instruction_label(
211 struct tgsi_token
*prev_token
,
212 struct tgsi_instruction
*instruction
,
213 struct tgsi_header
*header
);
215 struct tgsi_instruction_texture
216 tgsi_default_instruction_texture( void );
218 struct tgsi_instruction_texture
219 tgsi_build_instruction_texture(
221 struct tgsi_token
*prev_token
,
222 struct tgsi_instruction
*instruction
,
223 struct tgsi_header
*header
);
225 struct tgsi_src_register
226 tgsi_default_src_register( void );
228 struct tgsi_src_register
229 tgsi_build_src_register(
240 struct tgsi_instruction
*instruction
,
241 struct tgsi_header
*header
);
243 struct tgsi_full_src_register
244 tgsi_default_full_src_register( void );
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 );
273 #if defined __cplusplus
277 #endif /* TGSI_BUILD_H */