summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormichal <michal@michal-laptop.(none)>2007-08-07 10:24:27 +0100
committermichal <michal@michal-laptop.(none)>2007-08-07 11:50:01 +0100
commitc7e6a2eb83bbf86aa6d558aeb3f58cbc76a3983f (patch)
tree435e58d48f93d6c415dab5b988c2f3fba623af7b
parentcec49ee954287b7f34664ea9e8137c674c26dcf1 (diff)
Dump tokens in more compact form.
-rw-r--r--src/mesa/pipe/tgsi/core/tgsi_dump.c38
-rw-r--r--src/mesa/pipe/tgsi/core/tgsi_dump.h6
2 files changed, 31 insertions, 13 deletions
diff --git a/src/mesa/pipe/tgsi/core/tgsi_dump.c b/src/mesa/pipe/tgsi/core/tgsi_dump.c
index 882771da2e4..3e2eb4999f4 100644
--- a/src/mesa/pipe/tgsi/core/tgsi_dump.c
+++ b/src/mesa/pipe/tgsi/core/tgsi_dump.c
@@ -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();
diff --git a/src/mesa/pipe/tgsi/core/tgsi_dump.h b/src/mesa/pipe/tgsi/core/tgsi_dump.h
index dc34a840de6..8553bdff592 100644
--- a/src/mesa/pipe/tgsi/core/tgsi_dump.h
+++ b/src/mesa/pipe/tgsi/core/tgsi_dump.h
@@ -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(