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