mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-30 13:40:23 +01:00
Dump tokens in more compact form.
This commit is contained in:
parent
cec49ee954
commit
c7e6a2eb83
2 changed files with 31 additions and 13 deletions
|
|
@ -137,7 +137,15 @@ text_dump_untab(
|
|||
static const char *TGSI_PROCESSOR_TYPES[] =
|
||||
{
|
||||
"PROCESSOR_FRAGMENT",
|
||||
"PROCESSOR_VERTEX"
|
||||
"PROCESSOR_VERTEX",
|
||||
"PROCESSOR_GEOMETRY"
|
||||
};
|
||||
|
||||
static const char *TGSI_PROCESSOR_TYPES_SHORT[] =
|
||||
{
|
||||
"FRAG",
|
||||
"VERT",
|
||||
"GEOM"
|
||||
};
|
||||
|
||||
static const char *TGSI_TOKEN_TYPES[] =
|
||||
|
|
@ -406,6 +414,7 @@ tgsi_dump(
|
|||
struct tgsi_parse_context parse;
|
||||
struct tgsi_full_instruction fi;
|
||||
struct tgsi_full_declaration fd;
|
||||
GLuint verbose = flags & TGSI_DUMP_VERBOSE;
|
||||
GLuint ignored = !(flags & TGSI_DUMP_NO_IGNORED);
|
||||
GLuint deflt = !(flags & TGSI_DUMP_NO_DEFAULT);
|
||||
|
||||
|
|
@ -430,18 +439,27 @@ tgsi_dump(
|
|||
TXT( "tgsi-dump begin" );
|
||||
|
||||
CHR( '\n' );
|
||||
TXT( "\nMajorVersion: " );
|
||||
ENM( parse.FullHeader.Processor.Processor, TGSI_PROCESSOR_TYPES_SHORT );
|
||||
CHR( ' ' );
|
||||
UID( parse.FullVersion.Version.MajorVersion );
|
||||
TXT( "\nMinorVersion: " );
|
||||
CHR( '.' );
|
||||
UID( parse.FullVersion.Version.MinorVersion );
|
||||
|
||||
CHR( '\n' );
|
||||
TXT( "\nHeaderSize: " );
|
||||
UID( parse.FullHeader.Header.HeaderSize );
|
||||
TXT( "\nBodySize : " );
|
||||
UID( parse.FullHeader.Header.BodySize );
|
||||
TXT( "\nProcessor : " );
|
||||
ENM( parse.FullHeader.Processor.Processor, TGSI_PROCESSOR_TYPES );
|
||||
if( verbose ) {
|
||||
CHR( '\n' );
|
||||
TXT( "\nMajorVersion: " );
|
||||
UID( parse.FullVersion.Version.MajorVersion );
|
||||
TXT( "\nMinorVersion: " );
|
||||
UID( parse.FullVersion.Version.MinorVersion );
|
||||
|
||||
CHR( '\n' );
|
||||
TXT( "\nHeaderSize: " );
|
||||
UID( parse.FullHeader.Header.HeaderSize );
|
||||
TXT( "\nBodySize : " );
|
||||
UID( parse.FullHeader.Header.BodySize );
|
||||
TXT( "\nProcessor : " );
|
||||
ENM( parse.FullHeader.Processor.Processor, TGSI_PROCESSOR_TYPES );
|
||||
}
|
||||
|
||||
fi = tgsi_default_full_instruction();
|
||||
fd = tgsi_default_full_declaration();
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@
|
|||
extern "C" {
|
||||
#endif // defined __cplusplus
|
||||
|
||||
#define TGSI_DUMP_VERBOSE 0
|
||||
#define TGSI_DUMP_NO_IGNORED 1
|
||||
#define TGSI_DUMP_NO_DEFAULT 2
|
||||
#define TGSI_DUMP_VERBOSE 1
|
||||
#define TGSI_DUMP_NO_IGNORED 2
|
||||
#define TGSI_DUMP_NO_DEFAULT 4
|
||||
|
||||
void
|
||||
tgsi_dump(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue