tgsi_dump_c.h File Reference

Include dependency graph for tgsi_dump_c.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define TGSI_DUMP_C_IGNORED   1
#define TGSI_DUMP_C_DEFAULT   2

Functions

void tgsi_dump_c (const struct tgsi_token *tokens, uint flags)


Define Documentation

#define TGSI_DUMP_C_DEFAULT   2

Definition at line 38 of file tgsi_dump_c.h.

#define TGSI_DUMP_C_IGNORED   1

Definition at line 37 of file tgsi_dump_c.h.


Function Documentation

void tgsi_dump_c ( const struct tgsi_token tokens,
uint  flags 
)

Definition at line 641 of file tgsi_dump_c.c.

References assert, tgsi_header::BodySize, dump_declaration_verbose(), dump_immediate_verbose(), dump_instruction_verbose(), ENM, EOL, tgsi_token::Extended, tgsi_full_token::FullDeclaration, tgsi_parse_context::FullHeader, tgsi_full_token::FullImmediate, tgsi_full_token::FullInstruction, tgsi_parse_context::FullToken, tgsi_parse_context::FullVersion, tgsi_full_header::Header, tgsi_header::HeaderSize, tgsi_version::MajorVersion, tgsi_version::MinorVersion, tgsi_processor::Processor, tgsi_full_header::Processor, tgsi_token::Size, tgsi_default_full_declaration(), tgsi_default_full_instruction(), TGSI_DUMP_C_DEFAULT, TGSI_DUMP_C_IGNORED, tgsi_parse_end_of_tokens(), tgsi_parse_free(), tgsi_parse_init(), tgsi_parse_token(), TGSI_PROCESSOR_TYPES, TGSI_TOKEN_TYPE_DECLARATION, TGSI_TOKEN_TYPE_IMMEDIATE, TGSI_TOKEN_TYPE_INSTRUCTION, TGSI_TOKEN_TYPES, tgsi_full_token::Token, TXT, tgsi_token::Type, UID, and tgsi_full_version::Version.

00644 {
00645    struct tgsi_parse_context parse;
00646    struct tgsi_full_instruction fi;
00647    struct tgsi_full_declaration fd;
00648    uint ignored = flags & TGSI_DUMP_C_IGNORED;
00649    uint deflt = flags & TGSI_DUMP_C_DEFAULT;
00650    uint instno = 0;
00651 
00652    tgsi_parse_init( &parse, tokens );
00653 
00654    TXT( "tgsi-dump begin -----------------" );
00655 
00656    TXT( "\nMajorVersion: " );
00657    UID( parse.FullVersion.Version.MajorVersion );
00658    TXT( "\nMinorVersion: " );
00659    UID( parse.FullVersion.Version.MinorVersion );
00660    EOL();
00661 
00662    TXT( "\nHeaderSize: " );
00663    UID( parse.FullHeader.Header.HeaderSize );
00664    TXT( "\nBodySize  : " );
00665    UID( parse.FullHeader.Header.BodySize );
00666    TXT( "\nProcessor : " );
00667    ENM( parse.FullHeader.Processor.Processor, TGSI_PROCESSOR_TYPES );
00668    EOL();
00669 
00670    fi = tgsi_default_full_instruction();
00671    fd = tgsi_default_full_declaration();
00672 
00673    while( !tgsi_parse_end_of_tokens( &parse ) ) {
00674       tgsi_parse_token( &parse );
00675 
00676       TXT( "\nType       : " );
00677       ENM( parse.FullToken.Token.Type, TGSI_TOKEN_TYPES );
00678       if( ignored ) {
00679          TXT( "\nSize       : " );
00680          UID( parse.FullToken.Token.Size );
00681          if( deflt || parse.FullToken.Token.Extended ) {
00682             TXT( "\nExtended   : " );
00683             UID( parse.FullToken.Token.Extended );
00684          }
00685       }
00686 
00687       switch( parse.FullToken.Token.Type ) {
00688       case TGSI_TOKEN_TYPE_DECLARATION:
00689          dump_declaration_verbose(
00690             &parse.FullToken.FullDeclaration,
00691             ignored,
00692             deflt,
00693             &fd );
00694          break;
00695 
00696       case TGSI_TOKEN_TYPE_IMMEDIATE:
00697          dump_immediate_verbose(
00698             &parse.FullToken.FullImmediate,
00699             ignored );
00700          break;
00701 
00702       case TGSI_TOKEN_TYPE_INSTRUCTION:
00703          dump_instruction_verbose(
00704             &parse.FullToken.FullInstruction,
00705             ignored,
00706             deflt,
00707             &fi );
00708          break;
00709 
00710       default:
00711          assert( 0 );
00712       }
00713 
00714       EOL();
00715    }
00716 
00717    TXT( "\ntgsi-dump end -------------------\n" );
00718 
00719    tgsi_parse_free( &parse );
00720 }


Generated on Tue Sep 29 06:25:25 2009 for Gallium3D by  doxygen 1.5.4