tgsi_build.h

Go to the documentation of this file.
00001 /**************************************************************************
00002  * 
00003  * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
00004  * All Rights Reserved.
00005  * 
00006  * Permission is hereby granted, free of charge, to any person obtaining a
00007  * copy of this software and associated documentation files (the
00008  * "Software"), to deal in the Software without restriction, including
00009  * without limitation the rights to use, copy, modify, merge, publish,
00010  * distribute, sub license, and/or sell copies of the Software, and to
00011  * permit persons to whom the Software is furnished to do so, subject to
00012  * the following conditions:
00013  * 
00014  * The above copyright notice and this permission notice (including the
00015  * next paragraph) shall be included in all copies or substantial portions
00016  * of the Software.
00017  * 
00018  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
00019  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00020  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
00021  * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
00022  * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
00023  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
00024  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00025  * 
00026  **************************************************************************/
00027 
00028 #ifndef TGSI_BUILD_H
00029 #define TGSI_BUILD_H
00030 
00031 
00032 struct tgsi_token;
00033 
00034 
00035 #if defined __cplusplus
00036 extern "C" {
00037 #endif
00038 
00039 /*
00040  * version
00041  */
00042 
00043 struct tgsi_version
00044 tgsi_build_version( void );
00045 
00046 /*
00047  * header
00048  */
00049 
00050 struct tgsi_header
00051 tgsi_build_header( void );
00052 
00053 struct tgsi_processor
00054 tgsi_default_processor( void );
00055 
00056 struct tgsi_processor
00057 tgsi_build_processor(
00058    unsigned processor,
00059    struct tgsi_header *header );
00060 
00061 /*
00062  * declaration
00063  */
00064 
00065 struct tgsi_declaration
00066 tgsi_default_declaration( void );
00067 
00068 struct tgsi_declaration
00069 tgsi_build_declaration(
00070    unsigned file,
00071    unsigned usage_mask,
00072    unsigned interpolate,
00073    unsigned semantic,
00074    unsigned centroid,
00075    unsigned invariant,
00076    struct tgsi_header *header );
00077 
00078 struct tgsi_full_declaration
00079 tgsi_default_full_declaration( void );
00080 
00081 unsigned
00082 tgsi_build_full_declaration(
00083    const struct tgsi_full_declaration *full_decl,
00084    struct tgsi_token *tokens,
00085    struct tgsi_header *header,
00086    unsigned maxsize );
00087 
00088 struct tgsi_declaration_range
00089 tgsi_default_declaration_range( void );
00090 
00091 struct tgsi_declaration_range
00092 tgsi_build_declaration_range(
00093    unsigned first,
00094    unsigned last,
00095    struct tgsi_declaration *declaration,
00096    struct tgsi_header *header );
00097 
00098 struct tgsi_declaration_semantic
00099 tgsi_default_declaration_semantic( void );
00100 
00101 struct tgsi_declaration_semantic
00102 tgsi_build_declaration_semantic(
00103    unsigned semantic_name,
00104    unsigned semantic_index,
00105    struct tgsi_declaration *declaration,
00106    struct tgsi_header *header );
00107 
00108 /*
00109  * immediate
00110  */
00111 
00112 struct tgsi_immediate
00113 tgsi_default_immediate( void );
00114 
00115 struct tgsi_immediate
00116 tgsi_build_immediate(
00117    struct tgsi_header *header );
00118 
00119 struct tgsi_full_immediate
00120 tgsi_default_full_immediate( void );
00121 
00122 struct tgsi_immediate_float32
00123 tgsi_build_immediate_float32(
00124    float value,
00125    struct tgsi_immediate *immediate,
00126    struct tgsi_header *header );
00127 
00128 unsigned
00129 tgsi_build_full_immediate(
00130    const struct tgsi_full_immediate *full_imm,
00131    struct tgsi_token *tokens,
00132    struct tgsi_header *header,
00133    unsigned maxsize );
00134 
00135 /*
00136  * instruction
00137  */
00138 
00139 struct tgsi_instruction
00140 tgsi_default_instruction( void );
00141 
00142 struct tgsi_instruction
00143 tgsi_build_instruction(
00144    unsigned opcode,
00145    unsigned saturate,
00146    unsigned num_dst_regs,
00147    unsigned num_src_regs,
00148    struct tgsi_header *header );
00149 
00150 struct tgsi_full_instruction
00151 tgsi_default_full_instruction( void );
00152 
00153 unsigned
00154 tgsi_build_full_instruction(
00155    const struct tgsi_full_instruction *full_inst,
00156    struct tgsi_token *tokens,
00157    struct tgsi_header *header,
00158    unsigned maxsize );
00159 
00160 struct tgsi_instruction_ext_nv
00161 tgsi_default_instruction_ext_nv( void );
00162 
00163 unsigned
00164 tgsi_compare_instruction_ext_nv(
00165    struct tgsi_instruction_ext_nv a,
00166    struct tgsi_instruction_ext_nv b );
00167 
00168 struct tgsi_instruction_ext_nv
00169 tgsi_build_instruction_ext_nv(
00170    unsigned precision,
00171    unsigned cond_dst_index,
00172    unsigned cond_flow_index,
00173    unsigned cond_mask,
00174    unsigned cond_swizzle_x,
00175    unsigned cond_swizzle_y,
00176    unsigned cond_swizzle_z,
00177    unsigned cond_swizzle_w,
00178    unsigned cond_dst_update,
00179    unsigned cond_flow_enable,
00180    struct tgsi_token *prev_token,
00181    struct tgsi_instruction *instruction,
00182    struct tgsi_header *header );
00183 
00184 struct tgsi_instruction_ext_label
00185 tgsi_default_instruction_ext_label( void );
00186 
00187 unsigned
00188 tgsi_compare_instruction_ext_label(
00189    struct tgsi_instruction_ext_label a,
00190    struct tgsi_instruction_ext_label b );
00191 
00192 struct tgsi_instruction_ext_label
00193 tgsi_build_instruction_ext_label(
00194    unsigned label,
00195    struct tgsi_token *prev_token,
00196    struct tgsi_instruction *instruction,
00197    struct tgsi_header *header );
00198 
00199 struct tgsi_instruction_ext_texture
00200 tgsi_default_instruction_ext_texture( void );
00201 
00202 unsigned
00203 tgsi_compare_instruction_ext_texture(
00204    struct tgsi_instruction_ext_texture a,
00205    struct tgsi_instruction_ext_texture b );
00206 
00207 struct tgsi_instruction_ext_texture
00208 tgsi_build_instruction_ext_texture(
00209    unsigned texture,
00210    struct tgsi_token *prev_token,
00211    struct tgsi_instruction *instruction,
00212    struct tgsi_header *header );
00213 
00214 struct tgsi_src_register
00215 tgsi_default_src_register( void );
00216 
00217 struct tgsi_src_register
00218 tgsi_build_src_register(
00219    unsigned file,
00220    unsigned swizzle_x,
00221    unsigned swizzle_y,
00222    unsigned swizzle_z,
00223    unsigned swizzle_w,
00224    unsigned negate,
00225    unsigned indirect,
00226    unsigned dimension,
00227    int index,
00228    struct tgsi_instruction *instruction,
00229    struct tgsi_header *header );
00230 
00231 struct tgsi_full_src_register
00232 tgsi_default_full_src_register( void );
00233 
00234 struct tgsi_src_register_ext_swz
00235 tgsi_default_src_register_ext_swz( void );
00236 
00237 unsigned
00238 tgsi_compare_src_register_ext_swz(
00239    struct tgsi_src_register_ext_swz a,
00240    struct tgsi_src_register_ext_swz b );
00241 
00242 struct tgsi_src_register_ext_swz
00243 tgsi_build_src_register_ext_swz(
00244    unsigned ext_swizzle_x,
00245    unsigned ext_swizzle_y,
00246    unsigned ext_swizzle_z,
00247    unsigned ext_swizzle_w,
00248    unsigned negate_x,
00249    unsigned negate_y,
00250    unsigned negate_z,
00251    unsigned negate_w,
00252    struct tgsi_token *prev_token,
00253    struct tgsi_instruction *instruction,
00254    struct tgsi_header *header );
00255 
00256 struct tgsi_src_register_ext_mod
00257 tgsi_default_src_register_ext_mod( void );
00258 
00259 unsigned
00260 tgsi_compare_src_register_ext_mod(
00261    struct tgsi_src_register_ext_mod a,
00262    struct tgsi_src_register_ext_mod b );
00263 
00264 struct tgsi_src_register_ext_mod
00265 tgsi_build_src_register_ext_mod(
00266    unsigned complement,
00267    unsigned bias,
00268    unsigned scale_2x,
00269    unsigned absolute,
00270    unsigned negate,
00271    struct tgsi_token *prev_token,
00272    struct tgsi_instruction *instruction,
00273    struct tgsi_header *header );
00274 
00275 struct tgsi_dimension
00276 tgsi_default_dimension( void );
00277 
00278 struct tgsi_dimension
00279 tgsi_build_dimension(
00280    unsigned indirect,
00281    unsigned index,
00282    struct tgsi_instruction *instruction,
00283    struct tgsi_header *header );
00284 
00285 struct tgsi_dst_register
00286 tgsi_default_dst_register( void );
00287 
00288 struct tgsi_dst_register
00289 tgsi_build_dst_register(
00290    unsigned file,
00291    unsigned mask,
00292    int index,
00293    struct tgsi_instruction *instruction,
00294    struct tgsi_header *header );
00295 
00296 struct tgsi_full_dst_register
00297 tgsi_default_full_dst_register( void );
00298 
00299 struct tgsi_dst_register_ext_concode
00300 tgsi_default_dst_register_ext_concode( void );
00301 
00302 unsigned
00303 tgsi_compare_dst_register_ext_concode(
00304    struct tgsi_dst_register_ext_concode a,
00305    struct tgsi_dst_register_ext_concode b );
00306 
00307 struct tgsi_dst_register_ext_concode
00308 tgsi_build_dst_register_ext_concode(
00309    unsigned cc,
00310    unsigned swizzle_x,
00311    unsigned swizzle_y,
00312    unsigned swizzle_z,
00313    unsigned swizzle_w,
00314    int index,
00315    struct tgsi_token *prev_token,
00316    struct tgsi_instruction *instruction,
00317    struct tgsi_header *header );
00318 
00319 struct tgsi_dst_register_ext_modulate
00320 tgsi_default_dst_register_ext_modulate( void );
00321 
00322 unsigned
00323 tgsi_compare_dst_register_ext_modulate(
00324    struct tgsi_dst_register_ext_modulate a,
00325    struct tgsi_dst_register_ext_modulate b );
00326 
00327 struct tgsi_dst_register_ext_modulate
00328 tgsi_build_dst_register_ext_modulate(
00329    unsigned modulate,
00330    struct tgsi_token *prev_token,
00331    struct tgsi_instruction *instruction,
00332    struct tgsi_header *header );
00333 
00334 #if defined __cplusplus
00335 }
00336 #endif
00337 
00338 #endif /* TGSI_BUILD_H */

Generated on Tue Sep 29 06:25:15 2009 for Gallium3D by  doxygen 1.5.4