tgsi_strings.c revision 9cea86f501eab1f72a148280c12286244cd26acf
15821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)/************************************************************************** 25821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * 35821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * Copyright 2007-2008 Tungsten Graphics, Inc., Cedar Park, Texas. 45821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * Copyright 2012 VMware, Inc. 55821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * All Rights Reserved. 65821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * 75821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * Permission is hereby granted, free of charge, to any person obtaining a 85821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * copy of this software and associated documentation files (the 95821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * "Software"), to deal in the Software without restriction, including 10 * without limitation the rights to use, copy, modify, merge, publish, 11 * distribute, sub license, and/or sell copies of the Software, and to 12 * permit persons to whom the Software is furnished to do so, subject to 13 * the following conditions: 14 * 15 * The above copyright notice and this permission notice (including the 16 * next paragraph) shall be included in all copies or substantial portions 17 * of the Software. 18 * 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 22 * IN NO EVENT SHALL THE AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR 23 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 * 27 **************************************************************************/ 28 29 30#include "pipe/p_compiler.h" 31#include "util/u_memory.h" 32#include "tgsi_strings.h" 33 34 35const char *tgsi_processor_type_names[3] = 36{ 37 "FRAG", 38 "VERT", 39 "GEOM" 40}; 41 42const char *tgsi_file_names[TGSI_FILE_COUNT] = 43{ 44 "NULL", 45 "CONST", 46 "IN", 47 "OUT", 48 "TEMP", 49 "SAMP", 50 "ADDR", 51 "IMM", 52 "PRED", 53 "SV", 54 "IMMX", 55 "TEMPX", 56 "RES" 57}; 58 59const char *tgsi_semantic_names[TGSI_SEMANTIC_COUNT] = 60{ 61 "POSITION", 62 "COLOR", 63 "BCOLOR", 64 "FOG", 65 "PSIZE", 66 "GENERIC", 67 "NORMAL", 68 "FACE", 69 "EDGEFLAG", 70 "PRIM_ID", 71 "INSTANCEID", 72 "VERTEXID", 73 "STENCIL", 74 "CLIPDIST", 75 "CLIPVERTEX" 76}; 77 78const char *tgsi_texture_names[TGSI_TEXTURE_COUNT] = 79{ 80 "UNKNOWN", 81 "1D", 82 "2D", 83 "3D", 84 "CUBE", 85 "RECT", 86 "SHADOW1D", 87 "SHADOW2D", 88 "SHADOWRECT", 89 "1DARRAY", 90 "2DARRAY", 91 "SHADOW1DARRAY", 92 "SHADOW2DARRAY", 93}; 94 95const char *tgsi_property_names[TGSI_PROPERTY_COUNT] = 96{ 97 "GS_INPUT_PRIMITIVE", 98 "GS_OUTPUT_PRIMITIVE", 99 "GS_MAX_OUTPUT_VERTICES", 100 "FS_COORD_ORIGIN", 101 "FS_COORD_PIXEL_CENTER", 102 "FS_COLOR0_WRITES_ALL_CBUFS", 103 "FS_DEPTH_LAYOUT" 104}; 105 106const char *tgsi_type_names[5] = 107{ 108 "UNORM", 109 "SNORM", 110 "SINT", 111 "UINT", 112 "FLOAT" 113}; 114 115const char *tgsi_interpolate_names[TGSI_INTERPOLATE_COUNT] = 116{ 117 "CONSTANT", 118 "LINEAR", 119 "PERSPECTIVE" 120}; 121 122const char *tgsi_primitive_names[PIPE_PRIM_MAX] = 123{ 124 "POINTS", 125 "LINES", 126 "LINE_LOOP", 127 "LINE_STRIP", 128 "TRIANGLES", 129 "TRIANGLE_STRIP", 130 "TRIANGLE_FAN", 131 "QUADS", 132 "QUAD_STRIP", 133 "POLYGON", 134 "LINES_ADJACENCY", 135 "LINE_STRIP_ADJACENCY", 136 "TRIANGLES_ADJACENCY", 137 "TRIANGLE_STRIP_ADJACENCY" 138}; 139 140const char *tgsi_fs_coord_origin_names[2] = 141{ 142 "UPPER_LEFT", 143 "LOWER_LEFT" 144}; 145 146const char *tgsi_fs_coord_pixel_center_names[2] = 147{ 148 "HALF_INTEGER", 149 "INTEGER" 150}; 151 152const char *tgsi_immediate_type_names[3] = 153{ 154 "FLT32", 155 "UINT32", 156 "INT32" 157}; 158 159 160static INLINE void 161tgsi_strings_check(void) 162{ 163 STATIC_ASSERT(Elements(tgsi_file_names) == TGSI_FILE_COUNT); 164 STATIC_ASSERT(Elements(tgsi_semantic_names) == TGSI_SEMANTIC_COUNT); 165 STATIC_ASSERT(Elements(tgsi_texture_names) == TGSI_TEXTURE_COUNT); 166 STATIC_ASSERT(Elements(tgsi_property_names) == TGSI_PROPERTY_COUNT); 167 STATIC_ASSERT(Elements(tgsi_primitive_names) == PIPE_PRIM_MAX); 168 STATIC_ASSERT(Elements(tgsi_interpolate_names) == TGSI_INTERPOLATE_COUNT); 169 (void) tgsi_processor_type_names; 170 (void) tgsi_type_names; 171 (void) tgsi_immediate_type_names; 172 (void) tgsi_fs_coord_origin_names; 173 (void) tgsi_fs_coord_pixel_center_names; 174} 175