Go to the source code of this file.
Data Structures | |
struct | dump_ctx |
struct | str_dump_ctx |
Defines | |
#define | EOL() ctx->printf( ctx, "\n" ) |
#define | TXT(S) ctx->printf( ctx, "%s", S ) |
#define | CHR(C) ctx->printf( ctx, "%c", C ) |
#define | UIX(I) ctx->printf( ctx, "0x%x", I ) |
#define | UID(I) ctx->printf( ctx, "%u", I ) |
#define | INSTID(I) ctx->printf( ctx, "% 3u", I ) |
#define | SID(I) ctx->printf( ctx, "%d", I ) |
#define | FLT(F) ctx->printf( ctx, "%10.4f", F ) |
#define | ENM(E, ENUMS) dump_enum( ctx, E, ENUMS, sizeof( ENUMS ) / sizeof( *ENUMS ) ) |
Functions | |
static void | dump_ctx_printf (struct dump_ctx *ctx, const char *format,...) |
static void | dump_enum (struct dump_ctx *ctx, uint e, const char **enums, uint enum_count) |
static void | _dump_register (struct dump_ctx *ctx, uint file, int first, int last) |
static void | _dump_register_ind (struct dump_ctx *ctx, uint file, int index, uint ind_file, int ind_index, uint ind_swizzle) |
static void | _dump_writemask (struct dump_ctx *ctx, uint writemask) |
static boolean | iter_declaration (struct tgsi_iterate_context *iter, struct tgsi_full_declaration *decl) |
void | tgsi_dump_declaration (const struct tgsi_full_declaration *decl) |
static boolean | iter_immediate (struct tgsi_iterate_context *iter, struct tgsi_full_immediate *imm) |
void | tgsi_dump_immediate (const struct tgsi_full_immediate *imm) |
static boolean | iter_instruction (struct tgsi_iterate_context *iter, struct tgsi_full_instruction *inst) |
void | tgsi_dump_instruction (const struct tgsi_full_instruction *inst, uint instno) |
static boolean | prolog (struct tgsi_iterate_context *iter) |
void | tgsi_dump (const struct tgsi_token *tokens, uint flags) |
static void | str_dump_ctx_printf (struct dump_ctx *ctx, const char *format,...) |
void | tgsi_dump_str (const struct tgsi_token *tokens, uint flags, char *str, size_t size) |
Variables | |
static const char * | processor_type_names [] |
static const char * | file_names [TGSI_FILE_COUNT] |
static const char * | interpolate_names [] |
static const char * | semantic_names [] |
static const char * | immediate_type_names [] |
static const char * | swizzle_names [] |
static const char * | texture_names [] |
static const char * | extswizzle_names [] |
static const char * | modulate_names [TGSI_MODULATE_COUNT] |
#define CHR | ( | C | ) | ctx->printf( ctx, "%c", C ) |
Definition at line 70 of file tgsi_dump.c.
#define ENM | ( | E, | |||
ENUMS | ) | dump_enum( ctx, E, ENUMS, sizeof( ENUMS ) / sizeof( *ENUMS ) ) |
Definition at line 76 of file tgsi_dump.c.
#define EOL | ( | ) | ctx->printf( ctx, "\n" ) |
Definition at line 68 of file tgsi_dump.c.
#define FLT | ( | F | ) | ctx->printf( ctx, "%10.4f", F ) |
Definition at line 75 of file tgsi_dump.c.
#define INSTID | ( | I | ) | ctx->printf( ctx, "% 3u", I ) |
Definition at line 73 of file tgsi_dump.c.
#define SID | ( | I | ) | ctx->printf( ctx, "%d", I ) |
Definition at line 74 of file tgsi_dump.c.
#define TXT | ( | S | ) | ctx->printf( ctx, "%s", S ) |
Definition at line 69 of file tgsi_dump.c.
#define UID | ( | I | ) | ctx->printf( ctx, "%u", I ) |
Definition at line 72 of file tgsi_dump.c.
#define UIX | ( | I | ) | ctx->printf( ctx, "0x%x", I ) |
Definition at line 71 of file tgsi_dump.c.
Definition at line 164 of file tgsi_dump.c.
References CHR, ENM, file_names, SID, and TXT.
00169 { 00170 ENM( file, file_names ); 00171 CHR( '[' ); 00172 SID( first ); 00173 if (first != last) { 00174 TXT( ".." ); 00175 SID( last ); 00176 } 00177 CHR( ']' ); 00178 }
static void _dump_register_ind | ( | struct dump_ctx * | ctx, | |
uint | file, | |||
int | index, | |||
uint | ind_file, | |||
int | ind_index, | |||
uint | ind_swizzle | |||
) | [static] |
Definition at line 181 of file tgsi_dump.c.
References CHR, ENM, file_names, SID, swizzle_names, and TXT.
00188 { 00189 ENM( file, file_names ); 00190 CHR( '[' ); 00191 ENM( ind_file, file_names ); 00192 CHR( '[' ); 00193 SID( ind_index ); 00194 TXT( "]." ); 00195 ENM( ind_swizzle, swizzle_names ); 00196 if (index != 0) { 00197 if (index > 0) 00198 CHR( '+' ); 00199 SID( index ); 00200 } 00201 CHR( ']' ); 00202 }
Definition at line 205 of file tgsi_dump.c.
References CHR, TGSI_WRITEMASK_W, TGSI_WRITEMASK_X, TGSI_WRITEMASK_XYZW, TGSI_WRITEMASK_Y, and TGSI_WRITEMASK_Z.
00208 { 00209 if (writemask != TGSI_WRITEMASK_XYZW) { 00210 CHR( '.' ); 00211 if (writemask & TGSI_WRITEMASK_X) 00212 CHR( 'x' ); 00213 if (writemask & TGSI_WRITEMASK_Y) 00214 CHR( 'y' ); 00215 if (writemask & TGSI_WRITEMASK_Z) 00216 CHR( 'z' ); 00217 if (writemask & TGSI_WRITEMASK_W) 00218 CHR( 'w' ); 00219 } 00220 }
static void dump_ctx_printf | ( | struct dump_ctx * | ctx, | |
const char * | format, | |||
... | ||||
) | [static] |
Definition at line 46 of file tgsi_dump.c.
References debug_vprintf.
00047 { 00048 va_list ap; 00049 (void)ctx; 00050 va_start(ap, format); 00051 debug_vprintf(format, ap); 00052 va_end(ap); 00053 }
static void dump_enum | ( | struct dump_ctx * | ctx, | |
uint | e, | |||
const char ** | enums, | |||
uint | enum_count | |||
) | [static] |
Definition at line 56 of file tgsi_dump.c.
References dump_ctx::printf.
00061 { 00062 if (e >= enum_count) 00063 ctx->printf( ctx, "%u", e ); 00064 else 00065 ctx->printf( ctx, "%s", enums[e] ); 00066 }
static boolean iter_declaration | ( | struct tgsi_iterate_context * | iter, | |
struct tgsi_full_declaration * | decl | |||
) | [static] |
Definition at line 223 of file tgsi_dump.c.
References _dump_register(), _dump_writemask(), tgsi_declaration::Centroid, CHR, tgsi_full_declaration::Declaration, tgsi_full_declaration::DeclarationRange, ENM, EOL, tgsi_declaration::File, tgsi_declaration_range::First, tgsi_declaration::Interpolate, interpolate_names, tgsi_declaration::Invariant, tgsi_declaration_range::Last, tgsi_processor::Processor, tgsi_iterate_context::processor, tgsi_full_declaration::Semantic, tgsi_declaration::Semantic, semantic_names, tgsi_declaration_semantic::SemanticIndex, tgsi_declaration_semantic::SemanticName, TGSI_FILE_INPUT, TGSI_PROCESSOR_FRAGMENT, TGSI_SEMANTIC_GENERIC, TRUE, TXT, UID, and tgsi_declaration::UsageMask.
00226 { 00227 struct dump_ctx *ctx = (struct dump_ctx *)iter; 00228 00229 TXT( "DCL " ); 00230 00231 _dump_register( 00232 ctx, 00233 decl->Declaration.File, 00234 decl->DeclarationRange.First, 00235 decl->DeclarationRange.Last ); 00236 _dump_writemask( 00237 ctx, 00238 decl->Declaration.UsageMask ); 00239 00240 if (decl->Declaration.Semantic) { 00241 TXT( ", " ); 00242 ENM( decl->Semantic.SemanticName, semantic_names ); 00243 if (decl->Semantic.SemanticIndex != 0 || 00244 decl->Semantic.SemanticName == TGSI_SEMANTIC_GENERIC) { 00245 CHR( '[' ); 00246 UID( decl->Semantic.SemanticIndex ); 00247 CHR( ']' ); 00248 } 00249 } 00250 00251 if (iter->processor.Processor == TGSI_PROCESSOR_FRAGMENT && 00252 decl->Declaration.File == TGSI_FILE_INPUT) 00253 { 00254 TXT( ", " ); 00255 ENM( decl->Declaration.Interpolate, interpolate_names ); 00256 } 00257 00258 if (decl->Declaration.Centroid) { 00259 TXT( ", CENTROID" ); 00260 } 00261 00262 if (decl->Declaration.Invariant) { 00263 TXT( ", INVARIANT" ); 00264 } 00265 00266 EOL(); 00267 00268 return TRUE; 00269 }
static boolean iter_immediate | ( | struct tgsi_iterate_context * | iter, | |
struct tgsi_full_immediate * | imm | |||
) | [static] |
Definition at line 283 of file tgsi_dump.c.
References assert, tgsi_immediate::DataType, ENM, EOL, tgsi_immediate_float32::Float, FLT, tgsi_full_immediate::Immediate, immediate_type_names, tgsi_full_immediate::ImmediateFloat32, tgsi_immediate::Size, TGSI_IMM_FLOAT32, TRUE, TXT, and tgsi_full_immediate::u.
00286 { 00287 struct dump_ctx *ctx = (struct dump_ctx *) iter; 00288 00289 uint i; 00290 00291 TXT( "IMM " ); 00292 ENM( imm->Immediate.DataType, immediate_type_names ); 00293 00294 TXT( " { " ); 00295 for (i = 0; i < imm->Immediate.Size - 1; i++) { 00296 switch (imm->Immediate.DataType) { 00297 case TGSI_IMM_FLOAT32: 00298 FLT( imm->u.ImmediateFloat32[i].Float ); 00299 break; 00300 default: 00301 assert( 0 ); 00302 } 00303 00304 if (i < imm->Immediate.Size - 2) 00305 TXT( ", " ); 00306 } 00307 TXT( " }" ); 00308 00309 EOL(); 00310 00311 return TRUE; 00312 }
static boolean iter_instruction | ( | struct tgsi_iterate_context * | iter, | |
struct tgsi_full_instruction * | inst | |||
) | [static] |
Definition at line 326 of file tgsi_dump.c.
References _dump_register(), _dump_register_ind(), _dump_writemask(), tgsi_src_register_ext_mod::Absolute, assert, tgsi_src_register_ext_mod::Bias, CHR, tgsi_src_register_ext_mod::Complement, tgsi_full_dst_register::DstRegister, tgsi_full_dst_register::DstRegisterExtModulate, ENM, EOL, extswizzle_names, tgsi_src_register_ext_swz::ExtSwizzleW, tgsi_src_register_ext_swz::ExtSwizzleX, tgsi_src_register_ext_swz::ExtSwizzleY, tgsi_src_register_ext_swz::ExtSwizzleZ, FALSE, tgsi_src_register::File, tgsi_dst_register::File, tgsi_full_instruction::FullDstRegisters, tgsi_full_instruction::FullSrcRegisters, dump_ctx::indent, tgsi_src_register::Index, tgsi_dst_register::Index, tgsi_src_register::Indirect, INSTID, dump_ctx::instno, tgsi_full_instruction::Instruction, tgsi_full_instruction::InstructionExtLabel, tgsi_full_instruction::InstructionExtTexture, tgsi_instruction_ext_label::Label, tgsi_opcode_info::mnemonic, tgsi_dst_register_ext_modulate::Modulate, modulate_names, tgsi_src_register::Negate, tgsi_src_register_ext_mod::Negate, tgsi_src_register_ext_swz::NegateW, tgsi_src_register_ext_swz::NegateX, tgsi_src_register_ext_swz::NegateY, tgsi_src_register_ext_swz::NegateZ, tgsi_instruction::NumDstRegs, tgsi_instruction::NumSrcRegs, tgsi_instruction::Opcode, tgsi_opcode_info::post_indent, tgsi_opcode_info::pre_dedent, tgsi_instruction::Saturate, tgsi_src_register_ext_mod::Scale2X, tgsi_full_src_register::SrcRegister, tgsi_full_src_register::SrcRegisterExtMod, tgsi_full_src_register::SrcRegisterExtSwz, tgsi_full_src_register::SrcRegisterInd, swizzle_names, tgsi_src_register::SwizzleW, tgsi_src_register::SwizzleX, tgsi_src_register::SwizzleY, tgsi_src_register::SwizzleZ, tgsi_instruction_ext_texture::Texture, texture_names, TGSI_EXTSWIZZLE_W, TGSI_EXTSWIZZLE_X, TGSI_EXTSWIZZLE_Y, TGSI_EXTSWIZZLE_Z, tgsi_get_opcode_info(), TGSI_OPCODE_BGNLOOP2, TGSI_OPCODE_CAL, TGSI_OPCODE_ELSE, TGSI_OPCODE_ENDLOOP2, TGSI_OPCODE_IF, TGSI_SAT_MINUS_PLUS_ONE, TGSI_SAT_NONE, TGSI_SAT_ZERO_ONE, TGSI_SWIZZLE_W, TGSI_SWIZZLE_X, TGSI_SWIZZLE_Y, TGSI_SWIZZLE_Z, TGSI_TEXTURE_UNKNOWN, TRUE, TXT, UID, and tgsi_dst_register::WriteMask.
00329 { 00330 struct dump_ctx *ctx = (struct dump_ctx *) iter; 00331 uint instno = ctx->instno++; 00332 const struct tgsi_opcode_info *info = tgsi_get_opcode_info( inst->Instruction.Opcode ); 00333 uint i; 00334 boolean first_reg = TRUE; 00335 00336 INSTID( instno ); 00337 TXT( ": " ); 00338 00339 ctx->indent -= info->pre_dedent; 00340 for(i = 0; (int)i < ctx->indent; ++i) 00341 TXT( " " ); 00342 ctx->indent += info->post_indent; 00343 00344 TXT( info->mnemonic ); 00345 00346 switch (inst->Instruction.Saturate) { 00347 case TGSI_SAT_NONE: 00348 break; 00349 case TGSI_SAT_ZERO_ONE: 00350 TXT( "_SAT" ); 00351 break; 00352 case TGSI_SAT_MINUS_PLUS_ONE: 00353 TXT( "_SATNV" ); 00354 break; 00355 default: 00356 assert( 0 ); 00357 } 00358 00359 for (i = 0; i < inst->Instruction.NumDstRegs; i++) { 00360 const struct tgsi_full_dst_register *dst = &inst->FullDstRegisters[i]; 00361 00362 if (!first_reg) 00363 CHR( ',' ); 00364 CHR( ' ' ); 00365 00366 _dump_register( 00367 ctx, 00368 dst->DstRegister.File, 00369 dst->DstRegister.Index, 00370 dst->DstRegister.Index ); 00371 ENM( dst->DstRegisterExtModulate.Modulate, modulate_names ); 00372 _dump_writemask( ctx, dst->DstRegister.WriteMask ); 00373 00374 first_reg = FALSE; 00375 } 00376 00377 for (i = 0; i < inst->Instruction.NumSrcRegs; i++) { 00378 const struct tgsi_full_src_register *src = &inst->FullSrcRegisters[i]; 00379 00380 if (!first_reg) 00381 CHR( ',' ); 00382 CHR( ' ' ); 00383 00384 if (src->SrcRegisterExtMod.Negate) 00385 TXT( "-(" ); 00386 if (src->SrcRegisterExtMod.Absolute) 00387 CHR( '|' ); 00388 if (src->SrcRegisterExtMod.Scale2X) 00389 TXT( "2*(" ); 00390 if (src->SrcRegisterExtMod.Bias) 00391 CHR( '(' ); 00392 if (src->SrcRegisterExtMod.Complement) 00393 TXT( "1-(" ); 00394 if (src->SrcRegister.Negate) 00395 CHR( '-' ); 00396 00397 if (src->SrcRegister.Indirect) { 00398 _dump_register_ind( 00399 ctx, 00400 src->SrcRegister.File, 00401 src->SrcRegister.Index, 00402 src->SrcRegisterInd.File, 00403 src->SrcRegisterInd.Index, 00404 src->SrcRegisterInd.SwizzleX ); 00405 } 00406 else { 00407 _dump_register( 00408 ctx, 00409 src->SrcRegister.File, 00410 src->SrcRegister.Index, 00411 src->SrcRegister.Index ); 00412 } 00413 00414 if (src->SrcRegister.SwizzleX != TGSI_SWIZZLE_X || 00415 src->SrcRegister.SwizzleY != TGSI_SWIZZLE_Y || 00416 src->SrcRegister.SwizzleZ != TGSI_SWIZZLE_Z || 00417 src->SrcRegister.SwizzleW != TGSI_SWIZZLE_W) { 00418 CHR( '.' ); 00419 ENM( src->SrcRegister.SwizzleX, swizzle_names ); 00420 ENM( src->SrcRegister.SwizzleY, swizzle_names ); 00421 ENM( src->SrcRegister.SwizzleZ, swizzle_names ); 00422 ENM( src->SrcRegister.SwizzleW, swizzle_names ); 00423 } 00424 if (src->SrcRegisterExtSwz.ExtSwizzleX != TGSI_EXTSWIZZLE_X || 00425 src->SrcRegisterExtSwz.ExtSwizzleY != TGSI_EXTSWIZZLE_Y || 00426 src->SrcRegisterExtSwz.ExtSwizzleZ != TGSI_EXTSWIZZLE_Z || 00427 src->SrcRegisterExtSwz.ExtSwizzleW != TGSI_EXTSWIZZLE_W) { 00428 CHR( '.' ); 00429 if (src->SrcRegisterExtSwz.NegateX) 00430 TXT("-"); 00431 ENM( src->SrcRegisterExtSwz.ExtSwizzleX, extswizzle_names ); 00432 if (src->SrcRegisterExtSwz.NegateY) 00433 TXT("-"); 00434 ENM( src->SrcRegisterExtSwz.ExtSwizzleY, extswizzle_names ); 00435 if (src->SrcRegisterExtSwz.NegateZ) 00436 TXT("-"); 00437 ENM( src->SrcRegisterExtSwz.ExtSwizzleZ, extswizzle_names ); 00438 if (src->SrcRegisterExtSwz.NegateW) 00439 TXT("-"); 00440 ENM( src->SrcRegisterExtSwz.ExtSwizzleW, extswizzle_names ); 00441 } 00442 00443 if (src->SrcRegisterExtMod.Complement) 00444 CHR( ')' ); 00445 if (src->SrcRegisterExtMod.Bias) 00446 TXT( ")-.5" ); 00447 if (src->SrcRegisterExtMod.Scale2X) 00448 CHR( ')' ); 00449 if (src->SrcRegisterExtMod.Absolute) 00450 CHR( '|' ); 00451 if (src->SrcRegisterExtMod.Negate) 00452 CHR( ')' ); 00453 00454 first_reg = FALSE; 00455 } 00456 00457 if (inst->InstructionExtTexture.Texture != TGSI_TEXTURE_UNKNOWN) { 00458 TXT( ", " ); 00459 ENM( inst->InstructionExtTexture.Texture, texture_names ); 00460 } 00461 00462 switch (inst->Instruction.Opcode) { 00463 case TGSI_OPCODE_IF: 00464 case TGSI_OPCODE_ELSE: 00465 case TGSI_OPCODE_BGNLOOP2: 00466 case TGSI_OPCODE_ENDLOOP2: 00467 case TGSI_OPCODE_CAL: 00468 TXT( " :" ); 00469 UID( inst->InstructionExtLabel.Label ); 00470 break; 00471 } 00472 00473 EOL(); 00474 00475 return TRUE; 00476 }
static boolean prolog | ( | struct tgsi_iterate_context * | iter | ) | [static] |
Definition at line 493 of file tgsi_dump.c.
References CHR, ENM, EOL, tgsi_version::MajorVersion, tgsi_version::MinorVersion, tgsi_processor::Processor, tgsi_iterate_context::processor, processor_type_names, TRUE, UID, and tgsi_iterate_context::version.
00495 { 00496 struct dump_ctx *ctx = (struct dump_ctx *) iter; 00497 ENM( iter->processor.Processor, processor_type_names ); 00498 UID( iter->version.MajorVersion ); 00499 CHR( '.' ); 00500 UID( iter->version.MinorVersion ); 00501 EOL(); 00502 return TRUE; 00503 }
static void str_dump_ctx_printf | ( | struct dump_ctx * | ctx, | |
const char * | format, | |||
... | ||||
) | [static] |
Definition at line 534 of file tgsi_dump.c.
References str_dump_ctx::left, MIN2, str_dump_ctx::ptr, and util_vsnprintf.
00535 { 00536 struct str_dump_ctx *sctx = (struct str_dump_ctx *)ctx; 00537 00538 if(sctx->left > 1) { 00539 int written; 00540 va_list ap; 00541 va_start(ap, format); 00542 written = util_vsnprintf(sctx->ptr, sctx->left, format, ap); 00543 va_end(ap); 00544 00545 /* Some complicated logic needed to handle the return value of 00546 * vsnprintf: 00547 */ 00548 if (written > 0) { 00549 written = MIN2(sctx->left, written); 00550 sctx->ptr += written; 00551 sctx->left -= written; 00552 } 00553 } 00554 }
void tgsi_dump | ( | const struct tgsi_token * | tokens, | |
uint | flags | |||
) |
Definition at line 506 of file tgsi_dump.c.
References dump_ctx_printf(), tgsi_iterate_context::epilog, dump_ctx::indent, dump_ctx::instno, dump_ctx::iter, iter_declaration(), iter_immediate(), iter_instruction(), tgsi_iterate_context::iterate_declaration, tgsi_iterate_context::iterate_immediate, tgsi_iterate_context::iterate_instruction, dump_ctx::printf, prolog(), tgsi_iterate_context::prolog, and tgsi_iterate_shader().
00509 { 00510 struct dump_ctx ctx; 00511 00512 ctx.iter.prolog = prolog; 00513 ctx.iter.iterate_instruction = iter_instruction; 00514 ctx.iter.iterate_declaration = iter_declaration; 00515 ctx.iter.iterate_immediate = iter_immediate; 00516 ctx.iter.epilog = NULL; 00517 00518 ctx.instno = 0; 00519 ctx.indent = 0; 00520 ctx.printf = dump_ctx_printf; 00521 00522 tgsi_iterate_shader( tokens, &ctx.iter ); 00523 }
void tgsi_dump_declaration | ( | const struct tgsi_full_declaration * | decl | ) |
Definition at line 272 of file tgsi_dump.c.
References dump_ctx_printf(), dump_ctx::iter, iter_declaration(), and dump_ctx::printf.
00274 { 00275 struct dump_ctx ctx; 00276 00277 ctx.printf = dump_ctx_printf; 00278 00279 iter_declaration( &ctx.iter, (struct tgsi_full_declaration *)decl ); 00280 }
void tgsi_dump_immediate | ( | const struct tgsi_full_immediate * | imm | ) |
Definition at line 315 of file tgsi_dump.c.
References dump_ctx_printf(), dump_ctx::iter, iter_immediate(), and dump_ctx::printf.
00317 { 00318 struct dump_ctx ctx; 00319 00320 ctx.printf = dump_ctx_printf; 00321 00322 iter_immediate( &ctx.iter, (struct tgsi_full_immediate *)imm ); 00323 }
void tgsi_dump_instruction | ( | const struct tgsi_full_instruction * | inst, | |
uint | instno | |||
) |
Definition at line 479 of file tgsi_dump.c.
References dump_ctx_printf(), dump_ctx::indent, dump_ctx::instno, dump_ctx::iter, iter_instruction(), and dump_ctx::printf.
00482 { 00483 struct dump_ctx ctx; 00484 00485 ctx.instno = instno; 00486 ctx.indent = 0; 00487 ctx.printf = dump_ctx_printf; 00488 00489 iter_instruction( &ctx.iter, (struct tgsi_full_instruction *)inst ); 00490 }
void tgsi_dump_str | ( | const struct tgsi_token * | tokens, | |
uint | flags, | |||
char * | str, | |||
size_t | size | |||
) |
Definition at line 557 of file tgsi_dump.c.
References str_dump_ctx::base, tgsi_iterate_context::epilog, dump_ctx::indent, dump_ctx::instno, dump_ctx::iter, iter_declaration(), iter_immediate(), iter_instruction(), tgsi_iterate_context::iterate_declaration, tgsi_iterate_context::iterate_immediate, tgsi_iterate_context::iterate_instruction, str_dump_ctx::left, dump_ctx::printf, prolog(), tgsi_iterate_context::prolog, str_dump_ctx::ptr, str_dump_ctx::str, str_dump_ctx_printf(), and tgsi_iterate_shader().
00562 { 00563 struct str_dump_ctx ctx; 00564 00565 ctx.base.iter.prolog = prolog; 00566 ctx.base.iter.iterate_instruction = iter_instruction; 00567 ctx.base.iter.iterate_declaration = iter_declaration; 00568 ctx.base.iter.iterate_immediate = iter_immediate; 00569 ctx.base.iter.epilog = NULL; 00570 00571 ctx.base.instno = 0; 00572 ctx.base.indent = 0; 00573 ctx.base.printf = &str_dump_ctx_printf; 00574 00575 ctx.str = str; 00576 ctx.str[0] = 0; 00577 ctx.ptr = str; 00578 ctx.left = (int)size; 00579 00580 tgsi_iterate_shader( tokens, &ctx.base.iter ); 00581 }
const char* extswizzle_names[] [static] |
const char* file_names[TGSI_FILE_COUNT] [static] |
Initial value:
{ "NULL", "CONST", "IN", "OUT", "TEMP", "SAMP", "ADDR", "IMM", "LOOP" }
Definition at line 85 of file tgsi_dump.c.
const char* immediate_type_names[] [static] |
const char* interpolate_names[] [static] |
const char* modulate_names[TGSI_MODULATE_COUNT] [static] |
Initial value:
{ "", "_2X", "_4X", "_8X", "_D2", "_D4", "_D8" }
Definition at line 152 of file tgsi_dump.c.
const char* processor_type_names[] [static] |
const char* semantic_names[] [static] |
Initial value:
{ "POSITION", "COLOR", "BCOLOR", "FOG", "PSIZE", "GENERIC", "NORMAL" }
Definition at line 105 of file tgsi_dump.c.
const char* swizzle_names[] [static] |
const char* texture_names[] [static] |
Initial value:
{ "UNKNOWN", "1D", "2D", "3D", "CUBE", "RECT", "SHADOW1D", "SHADOW2D", "SHADOWRECT" }
Definition at line 129 of file tgsi_dump.c.