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 unsigned cylindrical_wrap
,
72 struct tgsi_header
*header
);
74 struct tgsi_full_declaration
75 tgsi_default_full_declaration( void );
78 tgsi_build_full_declaration(
79 const struct tgsi_full_declaration
*full_decl
,
80 struct tgsi_token
*tokens
,
81 struct tgsi_header
*header
,
84 struct tgsi_declaration_range
85 tgsi_default_declaration_range( void );
87 struct tgsi_declaration_range
88 tgsi_build_declaration_range(
91 struct tgsi_declaration
*declaration
,
92 struct tgsi_header
*header
);
94 struct tgsi_declaration_dimension
95 tgsi_default_declaration_dimension(void);
97 struct tgsi_declaration_dimension
98 tgsi_build_declaration_dimension(unsigned index_2d
,
99 struct tgsi_declaration
*declaration
,
100 struct tgsi_header
*header
);
102 struct tgsi_declaration_semantic
103 tgsi_default_declaration_semantic( void );
105 struct tgsi_declaration_semantic
106 tgsi_build_declaration_semantic(
107 unsigned semantic_name
,
108 unsigned semantic_index
,
109 struct tgsi_declaration
*declaration
,
110 struct tgsi_header
*header
);
116 struct tgsi_immediate
117 tgsi_default_immediate( void );
119 struct tgsi_immediate
120 tgsi_build_immediate(
121 struct tgsi_header
*header
);
123 struct tgsi_full_immediate
124 tgsi_default_full_immediate( void );
126 union tgsi_immediate_data
127 tgsi_build_immediate_float32(
129 struct tgsi_immediate
*immediate
,
130 struct tgsi_header
*header
);
133 tgsi_build_full_immediate(
134 const struct tgsi_full_immediate
*full_imm
,
135 struct tgsi_token
*tokens
,
136 struct tgsi_header
*header
,
144 tgsi_default_property( void );
148 unsigned property_name
,
149 struct tgsi_header
*header
);
151 struct tgsi_full_property
152 tgsi_default_full_property( void );
154 struct tgsi_property_data
155 tgsi_build_property_data(
157 struct tgsi_property
*property
,
158 struct tgsi_header
*header
);
161 tgsi_build_full_property(
162 const struct tgsi_full_property
*full_prop
,
163 struct tgsi_token
*tokens
,
164 struct tgsi_header
*header
,
171 struct tgsi_instruction
172 tgsi_default_instruction( void );
174 struct tgsi_instruction
175 tgsi_build_instruction(
179 unsigned num_dst_regs
,
180 unsigned num_src_regs
,
181 struct tgsi_header
*header
);
183 struct tgsi_full_instruction
184 tgsi_default_full_instruction( void );
187 tgsi_build_full_instruction(
188 const struct tgsi_full_instruction
*full_inst
,
189 struct tgsi_token
*tokens
,
190 struct tgsi_header
*header
,
193 struct tgsi_instruction_predicate
194 tgsi_default_instruction_predicate(void);
196 struct tgsi_instruction_predicate
197 tgsi_build_instruction_predicate(int index
,
203 struct tgsi_instruction
*instruction
,
204 struct tgsi_header
*header
);
206 struct tgsi_instruction_label
207 tgsi_default_instruction_label( void );
209 struct tgsi_instruction_label
210 tgsi_build_instruction_label(
212 struct tgsi_token
*prev_token
,
213 struct tgsi_instruction
*instruction
,
214 struct tgsi_header
*header
);
216 struct tgsi_instruction_texture
217 tgsi_default_instruction_texture( void );
219 struct tgsi_instruction_texture
220 tgsi_build_instruction_texture(
222 struct tgsi_token
*prev_token
,
223 struct tgsi_instruction
*instruction
,
224 struct tgsi_header
*header
);
226 struct tgsi_src_register
227 tgsi_default_src_register( void );
229 struct tgsi_src_register
230 tgsi_build_src_register(
241 struct tgsi_instruction
*instruction
,
242 struct tgsi_header
*header
);
244 struct tgsi_full_src_register
245 tgsi_default_full_src_register( void );
248 struct tgsi_dimension
249 tgsi_default_dimension( void );
251 struct tgsi_dimension
252 tgsi_build_dimension(
255 struct tgsi_instruction
*instruction
,
256 struct tgsi_header
*header
);
258 struct tgsi_dst_register
259 tgsi_default_dst_register( void );
261 struct tgsi_dst_register
262 tgsi_build_dst_register(
267 struct tgsi_instruction
*instruction
,
268 struct tgsi_header
*header
);
270 struct tgsi_full_dst_register
271 tgsi_default_full_dst_register( void );
274 #if defined __cplusplus
278 #endif /* TGSI_BUILD_H */