1 /************************************************************************** 2 * 3 * Copyright 2007 VMware, Inc. 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 VMWARE 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 struct tgsi_full_dst_register; 34 struct tgsi_full_src_register; 35 36 37 #if defined __cplusplus 38 extern "C" { 39 #endif 40 41 42 /* 43 * header 44 */ 45 46 struct tgsi_header 47 tgsi_build_header( void ); 48 49 struct tgsi_processor 50 tgsi_build_processor( 51 unsigned processor, 52 struct tgsi_header *header ); 53 54 /* 55 * declaration 56 */ 57 58 struct tgsi_full_declaration 59 tgsi_default_full_declaration( void ); 60 61 unsigned 62 tgsi_build_full_declaration( 63 const struct tgsi_full_declaration *full_decl, 64 struct tgsi_token *tokens, 65 struct tgsi_header *header, 66 unsigned maxsize ); 67 68 /* 69 * immediate 70 */ 71 72 struct tgsi_full_immediate 73 tgsi_default_full_immediate( void ); 74 75 unsigned 76 tgsi_build_full_immediate( 77 const struct tgsi_full_immediate *full_imm, 78 struct tgsi_token *tokens, 79 struct tgsi_header *header, 80 unsigned maxsize ); 81 82 /* 83 * properties 84 */ 85 86 struct tgsi_full_property 87 tgsi_default_full_property( void ); 88 89 unsigned 90 tgsi_build_full_property( 91 const struct tgsi_full_property *full_prop, 92 struct tgsi_token *tokens, 93 struct tgsi_header *header, 94 unsigned maxsize ); 95 96 /* 97 * instruction 98 */ 99 100 struct tgsi_instruction 101 tgsi_default_instruction( void ); 102 103 struct tgsi_full_instruction 104 tgsi_default_full_instruction( void ); 105 106 unsigned 107 tgsi_build_full_instruction( 108 const struct tgsi_full_instruction *full_inst, 109 struct tgsi_token *tokens, 110 struct tgsi_header *header, 111 unsigned maxsize ); 112 113 struct tgsi_instruction_predicate 114 tgsi_default_instruction_predicate(void); 115 116 struct tgsi_full_src_register 117 tgsi_full_src_register_from_dst(const struct tgsi_full_dst_register *dst); 118 119 #if defined __cplusplus 120 } 121 #endif 122 123 #endif /* TGSI_BUILD_H */ 124