14a49301eSmrg/************************************************************************** 24a49301eSmrg * 3af69d88dSmrg * Copyright 2007 VMware, Inc. 44a49301eSmrg * All Rights Reserved. 54a49301eSmrg * 64a49301eSmrg * Permission is hereby granted, free of charge, to any person obtaining a 74a49301eSmrg * copy of this software and associated documentation files (the 84a49301eSmrg * "Software"), to deal in the Software without restriction, including 94a49301eSmrg * without limitation the rights to use, copy, modify, merge, publish, 104a49301eSmrg * distribute, sub license, and/or sell copies of the Software, and to 114a49301eSmrg * permit persons to whom the Software is furnished to do so, subject to 124a49301eSmrg * the following conditions: 134a49301eSmrg * 144a49301eSmrg * The above copyright notice and this permission notice (including the 154a49301eSmrg * next paragraph) shall be included in all copies or substantial portions 164a49301eSmrg * of the Software. 174a49301eSmrg * 184a49301eSmrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 194a49301eSmrg * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 204a49301eSmrg * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 21af69d88dSmrg * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR 224a49301eSmrg * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 234a49301eSmrg * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 244a49301eSmrg * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 254a49301eSmrg * 264a49301eSmrg **************************************************************************/ 274a49301eSmrg 284a49301eSmrg#ifndef TGSI_BUILD_H 294a49301eSmrg#define TGSI_BUILD_H 304a49301eSmrg 3101e04c3fSmrg#include "tgsi/tgsi_parse.h" 324a49301eSmrg 334a49301eSmrg#if defined __cplusplus 344a49301eSmrgextern "C" { 354a49301eSmrg#endif 364a49301eSmrg 374a49301eSmrg 384a49301eSmrg/* 394a49301eSmrg * header 404a49301eSmrg */ 414a49301eSmrg 424a49301eSmrgstruct tgsi_header 434a49301eSmrgtgsi_build_header( void ); 444a49301eSmrg 454a49301eSmrgstruct tgsi_processor 464a49301eSmrgtgsi_build_processor( 474a49301eSmrg unsigned processor, 484a49301eSmrg struct tgsi_header *header ); 494a49301eSmrg 504a49301eSmrg/* 514a49301eSmrg * declaration 524a49301eSmrg */ 534a49301eSmrg 544a49301eSmrgstruct tgsi_full_declaration 554a49301eSmrgtgsi_default_full_declaration( void ); 564a49301eSmrg 574a49301eSmrgunsigned 584a49301eSmrgtgsi_build_full_declaration( 594a49301eSmrg const struct tgsi_full_declaration *full_decl, 604a49301eSmrg struct tgsi_token *tokens, 614a49301eSmrg struct tgsi_header *header, 624a49301eSmrg unsigned maxsize ); 634a49301eSmrg 644a49301eSmrg/* 654a49301eSmrg * immediate 664a49301eSmrg */ 674a49301eSmrg 684a49301eSmrgstruct tgsi_full_immediate 694a49301eSmrgtgsi_default_full_immediate( void ); 704a49301eSmrg 714a49301eSmrgunsigned 724a49301eSmrgtgsi_build_full_immediate( 734a49301eSmrg const struct tgsi_full_immediate *full_imm, 744a49301eSmrg struct tgsi_token *tokens, 754a49301eSmrg struct tgsi_header *header, 764a49301eSmrg unsigned maxsize ); 774a49301eSmrg 78cdc920a0Smrg/* 79cdc920a0Smrg * properties 80cdc920a0Smrg */ 81cdc920a0Smrg 82cdc920a0Smrgstruct tgsi_full_property 83cdc920a0Smrgtgsi_default_full_property( void ); 84cdc920a0Smrg 85cdc920a0Smrgunsigned 86cdc920a0Smrgtgsi_build_full_property( 87cdc920a0Smrg const struct tgsi_full_property *full_prop, 88cdc920a0Smrg struct tgsi_token *tokens, 89cdc920a0Smrg struct tgsi_header *header, 90cdc920a0Smrg unsigned maxsize ); 91cdc920a0Smrg 924a49301eSmrg/* 934a49301eSmrg * instruction 944a49301eSmrg */ 954a49301eSmrg 964a49301eSmrgstruct tgsi_instruction 974a49301eSmrgtgsi_default_instruction( void ); 984a49301eSmrg 994a49301eSmrgstruct tgsi_full_instruction 1004a49301eSmrgtgsi_default_full_instruction( void ); 1014a49301eSmrg 1024a49301eSmrgunsigned 1034a49301eSmrgtgsi_build_full_instruction( 1044a49301eSmrg const struct tgsi_full_instruction *full_inst, 1054a49301eSmrg struct tgsi_token *tokens, 1064a49301eSmrg struct tgsi_header *header, 1074a49301eSmrg unsigned maxsize ); 1084a49301eSmrg 10901e04c3fSmrgstruct tgsi_full_src_register 11001e04c3fSmrgtgsi_full_src_register_from_dst(const struct tgsi_full_dst_register *dst); 1114a49301eSmrg 1124a49301eSmrg#if defined __cplusplus 1134a49301eSmrg} 1144a49301eSmrg#endif 1154a49301eSmrg 1164a49301eSmrg#endif /* TGSI_BUILD_H */ 117