Home | History | Annotate | Download | only in tgsi
      1 /**************************************************************************
      2  *
      3  * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
      4  * All Rights Reserved.
      5  *
      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:
     13  *
     14  * The above copyright notice and this permission notice (including the
     15  * next paragraph) shall be included in all copies or substantial portions
     16  * of the Software.
     17  *
     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.
     25  *
     26  **************************************************************************/
     27 
     28 #ifndef TGSI_BUILD_H
     29 #define TGSI_BUILD_H
     30 
     31 
     32 struct tgsi_token;
     33 
     34 
     35 #if defined __cplusplus
     36 extern "C" {
     37 #endif
     38 
     39 
     40 /*
     41  * header
     42  */
     43 
     44 struct tgsi_header
     45 tgsi_build_header( void );
     46 
     47 struct tgsi_processor
     48 tgsi_build_processor(
     49    unsigned processor,
     50    struct tgsi_header *header );
     51 
     52 /*
     53  * declaration
     54  */
     55 
     56 struct tgsi_full_declaration
     57 tgsi_default_full_declaration( void );
     58 
     59 unsigned
     60 tgsi_build_full_declaration(
     61    const struct tgsi_full_declaration *full_decl,
     62    struct tgsi_token *tokens,
     63    struct tgsi_header *header,
     64    unsigned maxsize );
     65 
     66 /*
     67  * immediate
     68  */
     69 
     70 struct tgsi_full_immediate
     71 tgsi_default_full_immediate( void );
     72 
     73 unsigned
     74 tgsi_build_full_immediate(
     75    const struct tgsi_full_immediate *full_imm,
     76    struct tgsi_token *tokens,
     77    struct tgsi_header *header,
     78    unsigned maxsize );
     79 
     80 /*
     81  * properties
     82  */
     83 
     84 struct tgsi_full_property
     85 tgsi_default_full_property( void );
     86 
     87 unsigned
     88 tgsi_build_full_property(
     89    const struct tgsi_full_property *full_prop,
     90    struct tgsi_token *tokens,
     91    struct tgsi_header *header,
     92    unsigned maxsize );
     93 
     94 /*
     95  * instruction
     96  */
     97 
     98 struct tgsi_instruction
     99 tgsi_default_instruction( void );
    100 
    101 struct tgsi_full_instruction
    102 tgsi_default_full_instruction( void );
    103 
    104 unsigned
    105 tgsi_build_full_instruction(
    106    const struct tgsi_full_instruction *full_inst,
    107    struct tgsi_token *tokens,
    108    struct tgsi_header *header,
    109    unsigned maxsize );
    110 
    111 struct tgsi_instruction_predicate
    112 tgsi_default_instruction_predicate(void);
    113 
    114 #if defined __cplusplus
    115 }
    116 #endif
    117 
    118 #endif /* TGSI_BUILD_H */
    119