summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/tgsi/util
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2008-03-14 08:42:08 +0000
committerKeith Whitwell <[email protected]>2008-03-14 08:42:08 +0000
commitd34bc880a4d17420ec20d422dcb461783457c473 (patch)
tree591c8c97704c01572b4fc401bc35839dc34bde9e /src/gallium/auxiliary/tgsi/util
parent78302c7ca30d27ef3d087deb4d1a22e83858ce4b (diff)
tgsi: add debug_printf version of tgsi_dump
Diffstat (limited to 'src/gallium/auxiliary/tgsi/util')
-rw-r--r--src/gallium/auxiliary/tgsi/util/tgsi_dump.c22
-rw-r--r--src/gallium/auxiliary/tgsi/util/tgsi_dump.h4
2 files changed, 26 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/tgsi/util/tgsi_dump.c b/src/gallium/auxiliary/tgsi/util/tgsi_dump.c
index aa782787009..7d292778ad5 100644
--- a/src/gallium/auxiliary/tgsi/util/tgsi_dump.c
+++ b/src/gallium/auxiliary/tgsi/util/tgsi_dump.c
@@ -1563,3 +1563,25 @@ tgsi_dump_str(
*str = dump.text;
}
+
+
+void tgsi_debug_dump( struct tgsi_token *tokens )
+{
+ char *str, *p;
+
+ tgsi_dump_str( &str, tokens, 0 );
+
+ p = str;
+ while (p != NULL)
+ {
+ char *end = strchr( p, '\n' );
+ if (end != NULL)
+ {
+ *end++ = '\0';
+ }
+ debug_printf( "%s\n", p );
+ p = end;
+ }
+
+ FREE( str );
+}
diff --git a/src/gallium/auxiliary/tgsi/util/tgsi_dump.h b/src/gallium/auxiliary/tgsi/util/tgsi_dump.h
index b983b382268..51d79a0362e 100644
--- a/src/gallium/auxiliary/tgsi/util/tgsi_dump.h
+++ b/src/gallium/auxiliary/tgsi/util/tgsi_dump.h
@@ -20,6 +20,10 @@ tgsi_dump_str(
const struct tgsi_token *tokens,
unsigned flags );
+/* Dump to debug_printf()
+ */
+void tgsi_debug_dump( struct tgsi_token *tokens );
+
#if defined __cplusplus
}
#endif