00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #include "pipe/p_debug.h"
00029 #include "tgsi_info.h"
00030
00031 static const struct tgsi_opcode_info opcode_info[TGSI_OPCODE_LAST] =
00032 {
00033 { 1, 1, 0, 0, 0, 0, "ARL" },
00034 { 1, 1, 0, 0, 0, 0, "MOV" },
00035 { 1, 1, 0, 0, 0, 0, "LIT" },
00036 { 1, 1, 0, 0, 0, 0, "RCP" },
00037 { 1, 1, 0, 0, 0, 0, "RSQ" },
00038 { 1, 1, 0, 0, 0, 0, "EXP" },
00039 { 1, 1, 0, 0, 0, 0, "LOG" },
00040 { 1, 2, 0, 0, 0, 0, "MUL" },
00041 { 1, 2, 0, 0, 0, 0, "ADD" },
00042 { 1, 2, 0, 0, 0, 0, "DP3" },
00043 { 1, 2, 0, 0, 0, 0, "DP4" },
00044 { 1, 2, 0, 0, 0, 0, "DST" },
00045 { 1, 2, 0, 0, 0, 0, "MIN" },
00046 { 1, 2, 0, 0, 0, 0, "MAX" },
00047 { 1, 2, 0, 0, 0, 0, "SLT" },
00048 { 1, 2, 0, 0, 0, 0, "SGE" },
00049 { 1, 3, 0, 0, 0, 0, "MAD" },
00050 { 1, 2, 0, 0, 0, 0, "SUB" },
00051 { 1, 3, 0, 0, 0, 0, "LERP" },
00052 { 1, 3, 0, 0, 0, 0, "CND" },
00053 { 1, 3, 0, 0, 0, 0, "CND0" },
00054 { 1, 3, 0, 0, 0, 0, "DOT2ADD" },
00055 { 1, 2, 0, 0, 0, 0, "INDEX" },
00056 { 1, 1, 0, 0, 0, 0, "NEGATE" },
00057 { 1, 1, 0, 0, 0, 0, "FRAC" },
00058 { 1, 3, 0, 0, 0, 0, "CLAMP" },
00059 { 1, 1, 0, 0, 0, 0, "FLOOR" },
00060 { 1, 1, 0, 0, 0, 0, "ROUND" },
00061 { 1, 1, 0, 0, 0, 0, "EXPBASE2" },
00062 { 1, 1, 0, 0, 0, 0, "LOGBASE2" },
00063 { 1, 2, 0, 0, 0, 0, "POWER" },
00064 { 1, 2, 0, 0, 0, 0, "CROSSPRODUCT" },
00065 { 1, 2, 0, 0, 0, 0, "MULTIPLYMATRIX" },
00066 { 1, 1, 0, 0, 0, 0, "ABS" },
00067 { 1, 1, 0, 0, 0, 0, "RCC" },
00068 { 1, 2, 0, 0, 0, 0, "DPH" },
00069 { 1, 1, 0, 0, 0, 0, "COS" },
00070 { 1, 1, 0, 0, 0, 0, "DDX" },
00071 { 1, 1, 0, 0, 0, 0, "DDY" },
00072 { 0, 0, 0, 0, 0, 0, "KILP" },
00073 { 1, 1, 0, 0, 0, 0, "PK2H" },
00074 { 1, 1, 0, 0, 0, 0, "PK2US" },
00075 { 1, 1, 0, 0, 0, 0, "PK4B" },
00076 { 1, 1, 0, 0, 0, 0, "PK4UB" },
00077 { 1, 2, 0, 0, 0, 0, "RFL" },
00078 { 1, 2, 0, 0, 0, 0, "SEQ" },
00079 { 1, 2, 0, 0, 0, 0, "SFL" },
00080 { 1, 2, 0, 0, 0, 0, "SGT" },
00081 { 1, 1, 0, 0, 0, 0, "SIN" },
00082 { 1, 2, 0, 0, 0, 0, "SLE" },
00083 { 1, 2, 0, 0, 0, 0, "SNE" },
00084 { 1, 2, 0, 0, 0, 0, "STR" },
00085 { 1, 2, 1, 0, 0, 0, "TEX" },
00086 { 1, 4, 1, 0, 0, 0, "TXD" },
00087 { 1, 2, 1, 0, 0, 0, "TXP" },
00088 { 1, 1, 0, 0, 0, 0, "UP2H" },
00089 { 1, 1, 0, 0, 0, 0, "UP2US" },
00090 { 1, 1, 0, 0, 0, 0, "UP4B" },
00091 { 1, 1, 0, 0, 0, 0, "UP4UB" },
00092 { 1, 3, 0, 0, 0, 0, "X2D" },
00093 { 1, 1, 0, 0, 0, 0, "ARA" },
00094 { 1, 1, 0, 0, 0, 0, "ARR" },
00095 { 0, 1, 0, 0, 0, 0, "BRA" },
00096 { 0, 0, 0, 1, 0, 0, "CAL" },
00097 { 0, 0, 0, 0, 0, 0, "RET" },
00098 { 1, 1, 0, 0, 0, 0, "SSG" },
00099 { 1, 3, 0, 0, 0, 0, "CMP" },
00100 { 1, 1, 0, 0, 0, 0, "SCS" },
00101 { 1, 2, 1, 0, 0, 0, "TXB" },
00102 { 1, 1, 0, 0, 0, 0, "NRM" },
00103 { 1, 2, 0, 0, 0, 0, "DIV" },
00104 { 1, 2, 0, 0, 0, 0, "DP2" },
00105 { 1, 2, 1, 0, 0, 0, "TXL" },
00106 { 0, 0, 0, 0, 0, 0, "BRK" },
00107 { 0, 1, 0, 1, 0, 1, "IF" },
00108 { 1, 1, 0, 0, 0, 1, "LOOP" },
00109 { 0, 1, 0, 0, 0, 0, "REP" },
00110 { 0, 0, 0, 1, 1, 1, "ELSE" },
00111 { 0, 0, 0, 0, 1, 0, "ENDIF" },
00112 { 0, 0, 0, 0, 1, 0, "ENDLOOP" },
00113 { 0, 0, 0, 0, 1, 0, "ENDREP" },
00114 { 0, 1, 0, 0, 0, 0, "PUSHA" },
00115 { 1, 0, 0, 0, 0, 0, "POPA" },
00116 { 1, 1, 0, 0, 0, 0, "CEIL" },
00117 { 1, 1, 0, 0, 0, 0, "I2F" },
00118 { 1, 1, 0, 0, 0, 0, "NOT" },
00119 { 1, 1, 0, 0, 0, 0, "TRUNC" },
00120 { 1, 2, 0, 0, 0, 0, "SHL" },
00121 { 1, 2, 0, 0, 0, 0, "SHR" },
00122 { 1, 2, 0, 0, 0, 0, "AND" },
00123 { 1, 2, 0, 0, 0, 0, "OR" },
00124 { 1, 2, 0, 0, 0, 0, "MOD" },
00125 { 1, 2, 0, 0, 0, 0, "XOR" },
00126 { 1, 3, 0, 0, 0, 0, "SAD" },
00127 { 1, 2, 1, 0, 0, 0, "TXF" },
00128 { 1, 2, 1, 0, 0, 0, "TXQ" },
00129 { 0, 0, 0, 0, 0, 0, "CONT" },
00130 { 0, 0, 0, 0, 0, 0, "EMIT" },
00131 { 0, 0, 0, 0, 0, 0, "ENDPRIM" },
00132 { 0, 0, 0, 1, 0, 1, "BGNLOOP2" },
00133 { 0, 0, 0, 0, 0, 1, "BGNSUB" },
00134 { 0, 0, 0, 1, 1, 0, "ENDLOOP2" },
00135 { 0, 0, 0, 0, 1, 0, "ENDSUB" },
00136 { 1, 1, 0, 0, 0, 0, "NOISE1" },
00137 { 1, 1, 0, 0, 0, 0, "NOISE2" },
00138 { 1, 1, 0, 0, 0, 0, "NOISE3" },
00139 { 1, 1, 0, 0, 0, 0, "NOISE4" },
00140 { 0, 0, 0, 0, 0, 0, "NOP" },
00141 { 1, 2, 0, 0, 0, 0, "M4X3" },
00142 { 1, 2, 0, 0, 0, 0, "M3X4" },
00143 { 1, 2, 0, 0, 0, 0, "M3X3" },
00144 { 1, 2, 0, 0, 0, 0, "M3X2" },
00145 { 1, 1, 0, 0, 0, 0, "NRM4" },
00146 { 0, 1, 0, 0, 0, 0, "CALLNZ" },
00147 { 0, 1, 0, 0, 0, 0, "IFC" },
00148 { 0, 1, 0, 0, 0, 0, "BREAKC" },
00149 { 0, 1, 0, 0, 0, 0, "KIL" },
00150 { 0, 0, 0, 0, 0, 0, "END" },
00151 { 1, 1, 0, 0, 0, 0, "SWZ" }
00152 };
00153
00154 const struct tgsi_opcode_info *
00155 tgsi_get_opcode_info( uint opcode )
00156 {
00157 if (opcode < TGSI_OPCODE_LAST)
00158 return &opcode_info[opcode];
00159 assert( 0 );
00160 return NULL;
00161 }