tgsi_info.c revision 8cdab20c9a0d8794d5d85dbeef478b982ce39506
1/************************************************************************** 2 * 3 * Copyright 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#include "pipe/p_debug.h" 29#include "tgsi_info.h" 30 31static const struct tgsi_opcode_info opcode_info[TGSI_OPCODE_LAST] = 32{ 33 { 1, 1, 0, 0, "ARL" }, 34 { 1, 1, 0, 0, "MOV" }, 35 { 1, 1, 0, 0, "LIT" }, 36 { 1, 1, 0, 0, "RCP" }, 37 { 1, 1, 0, 0, "RSQ" }, 38 { 1, 1, 0, 0, "EXP" }, 39 { 1, 1, 0, 0, "LOG" }, 40 { 1, 2, 0, 0, "MUL" }, 41 { 1, 2, 0, 0, "ADD" }, 42 { 1, 2, 0, 0, "DP3" }, 43 { 1, 2, 0, 0, "DP4" }, 44 { 1, 2, 0, 0, "DST" }, 45 { 1, 2, 0, 0, "MIN" }, 46 { 1, 2, 0, 0, "MAX" }, 47 { 1, 2, 0, 0, "SLT" }, 48 { 1, 2, 0, 0, "SGE" }, 49 { 1, 3, 0, 0, "MAD" }, 50 { 1, 2, 0, 0, "SUB" }, 51 { 1, 3, 0, 0, "LERP" }, 52 { 1, 3, 0, 0, "CND" }, 53 { 1, 3, 0, 0, "CND0" }, 54 { 1, 3, 0, 0, "DOT2ADD" }, 55 { 1, 2, 0, 0, "INDEX" }, 56 { 1, 1, 0, 0, "NEGATE" }, 57 { 1, 1, 0, 0, "FRAC" }, 58 { 1, 3, 0, 0, "CLAMP" }, 59 { 1, 1, 0, 0, "FLOOR" }, 60 { 1, 1, 0, 0, "ROUND" }, 61 { 1, 1, 0, 0, "EXPBASE2" }, 62 { 1, 1, 0, 0, "LOGBASE2" }, 63 { 1, 2, 0, 0, "POWER" }, 64 { 1, 2, 0, 0, "CROSSPRODUCT" }, 65 { 1, 2, 0, 0, "MULTIPLYMATRIX" }, 66 { 1, 1, 0, 0, "ABS" }, 67 { 1, 1, 0, 0, "RCC" }, 68 { 1, 2, 0, 0, "DPH" }, 69 { 1, 1, 0, 0, "COS" }, 70 { 1, 1, 0, 0, "DDX" }, 71 { 1, 1, 0, 0, "DDY" }, 72 { 0, 0, 0, 0, "KILP" }, 73 { 1, 1, 0, 0, "PK2H" }, 74 { 1, 1, 0, 0, "PK2US" }, 75 { 1, 1, 0, 0, "PK4B" }, 76 { 1, 1, 0, 0, "PK4UB" }, 77 { 1, 2, 0, 0, "RFL" }, 78 { 1, 2, 0, 0, "SEQ" }, 79 { 1, 2, 0, 0, "SFL" }, 80 { 1, 2, 0, 0, "SGT" }, 81 { 1, 1, 0, 0, "SIN" }, 82 { 1, 2, 0, 0, "SLE" }, 83 { 1, 2, 0, 0, "SNE" }, 84 { 1, 2, 0, 0, "STR" }, 85 { 1, 2, 1, 0, "TEX" }, 86 { 1, 4, 1, 0, "TXD" }, 87 { 1, 2, 1, 0, "TXP" }, 88 { 1, 1, 0, 0, "UP2H" }, 89 { 1, 1, 0, 0, "UP2US" }, 90 { 1, 1, 0, 0, "UP4B" }, 91 { 1, 1, 0, 0, "UP4UB" }, 92 { 1, 3, 0, 0, "X2D" }, 93 { 1, 1, 0, 0, "ARA" }, 94 { 1, 1, 0, 0, "ARR" }, 95 { 0, 1, 0, 0, "BRA" }, 96 { 0, 0, 0, 1, "CAL" }, 97 { 0, 0, 0, 0, "RET" }, 98 { 1, 1, 0, 0, "SSG" }, 99 { 1, 3, 0, 0, "CMP" }, 100 { 1, 1, 0, 0, "SCS" }, 101 { 1, 2, 1, 0, "TXB" }, 102 { 1, 1, 0, 0, "NRM" }, 103 { 1, 2, 0, 0, "DIV" }, 104 { 1, 2, 0, 0, "DP2" }, 105 { 1, 2, 1, 0, "TXL" }, 106 { 0, 0, 0, 0, "BRK" }, 107 { 0, 1, 0, 1, "IF" }, 108 { 0, 0, 0, 0, "LOOP" }, 109 { 0, 1, 0, 0, "REP" }, 110 { 0, 0, 0, 1, "ELSE" }, 111 { 0, 0, 0, 0, "ENDIF" }, 112 { 0, 0, 0, 0, "ENDLOOP" }, 113 { 0, 0, 0, 0, "ENDREP" }, 114 { 0, 1, 0, 0, "PUSHA" }, 115 { 1, 0, 0, 0, "POPA" }, 116 { 1, 1, 0, 0, "CEIL" }, 117 { 1, 1, 0, 0, "I2F" }, 118 { 1, 1, 0, 0, "NOT" }, 119 { 1, 1, 0, 0, "TRUNC" }, 120 { 1, 2, 0, 0, "SHL" }, 121 { 1, 2, 0, 0, "SHR" }, 122 { 1, 2, 0, 0, "AND" }, 123 { 1, 2, 0, 0, "OR" }, 124 { 1, 2, 0, 0, "MOD" }, 125 { 1, 2, 0, 0, "XOR" }, 126 { 1, 3, 0, 0, "SAD" }, 127 { 1, 2, 1, 0, "TXF" }, 128 { 1, 2, 1, 0, "TXQ" }, 129 { 0, 0, 0, 0, "CONT" }, 130 { 0, 0, 0, 0, "EMIT" }, 131 { 0, 0, 0, 0, "ENDPRIM" }, 132 { 0, 0, 0, 1, "BGNLOOP2" }, 133 { 0, 0, 0, 0, "BGNSUB" }, 134 { 0, 0, 0, 1, "ENDLOOP2" }, 135 { 0, 0, 0, 0, "ENDSUB" }, 136 { 1, 1, 0, 0, "NOISE1" }, 137 { 1, 1, 0, 0, "NOISE2" }, 138 { 1, 1, 0, 0, "NOISE3" }, 139 { 1, 1, 0, 0, "NOISE4" }, 140 { 0, 0, 0, 0, "NOP" }, 141 { 1, 2, 0, 0, "M4X3" }, 142 { 1, 2, 0, 0, "M3X4" }, 143 { 1, 2, 0, 0, "M3X3" }, 144 { 1, 2, 0, 0, "M3X2" }, 145 { 1, 1, 0, 0, "NRM4" }, 146 { 0, 1, 0, 0, "CALLNZ" }, 147 { 0, 1, 0, 0, "IFC" }, 148 { 0, 1, 0, 0, "BREAKC" }, 149 { 0, 1, 0, 0, "KIL" }, 150 { 0, 0, 0, 0, "END" }, 151 { 1, 1, 0, 0, "SWZ" } 152}; 153 154const struct tgsi_opcode_info * 155tgsi_get_opcode_info( uint opcode ) 156{ 157 if (opcode < TGSI_OPCODE_LAST) 158 return &opcode_info[opcode]; 159 assert( 0 ); 160 return NULL; 161} 162