tgsi_dump.h revision 92209314df4f12e8b47336a25ba14cb6b9a23df2
1/************************************************************************** 2 * 3 * Copyright 2007-2008 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_DUMP_H 29#define TGSI_DUMP_H 30 31#include "pipe/p_compiler.h" 32#include "pipe/p_defines.h" 33#include "pipe/p_shader_tokens.h" 34 35#if defined __cplusplus 36extern "C" { 37#endif 38 39extern const char * 40tgsi_file_names[TGSI_FILE_COUNT]; 41 42extern const char * 43tgsi_swizzle_names[4]; 44 45extern const char * 46tgsi_texture_names[TGSI_TEXTURE_COUNT]; 47 48extern const char * 49tgsi_property_names[TGSI_PROPERTY_COUNT]; 50 51extern const char * 52tgsi_primitive_names[PIPE_PRIM_MAX]; 53 54extern const char * 55tgsi_fs_coord_origin_names[2]; 56 57extern const char * 58tgsi_fs_coord_pixel_center_names[2]; 59 60void 61tgsi_dump_str( 62 const struct tgsi_token *tokens, 63 uint flags, 64 char *str, 65 size_t size); 66 67void 68tgsi_dump( 69 const struct tgsi_token *tokens, 70 uint flags ); 71 72struct tgsi_full_immediate; 73struct tgsi_full_instruction; 74struct tgsi_full_declaration; 75struct tgsi_full_property; 76 77void 78tgsi_dump_immediate( 79 const struct tgsi_full_immediate *imm ); 80 81void 82tgsi_dump_instruction( 83 const struct tgsi_full_instruction *inst, 84 uint instno ); 85 86void 87tgsi_dump_declaration( 88 const struct tgsi_full_declaration *decl ); 89 90void 91tgsi_dump_property( 92 const struct tgsi_full_property *prop ); 93 94#if defined __cplusplus 95} 96#endif 97 98#endif /* TGSI_DUMP_H */ 99