summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/tgsi/tgsi_parse.h
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2010-08-20 14:51:57 +0100
committerKeith Whitwell <[email protected]>2010-08-25 10:29:26 +0100
commit285ea417ef5ee1027d1e8dd03b069cb157105bf7 (patch)
treea6e452c128ba637b60b846c401a1e949512a3dda /src/gallium/auxiliary/tgsi/tgsi_parse.h
parent6c0dc4bafbdbdc0cb4b6e5934fe064226dbd47ec (diff)
tgsi: helper for dumping tokens as hex
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_parse.h')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_parse.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_parse.h b/src/gallium/auxiliary/tgsi/tgsi_parse.h
index 36de8807b44..bb2bb0d3d3f 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_parse.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_parse.h
@@ -132,8 +132,15 @@ void
tgsi_parse_token(
struct tgsi_parse_context *ctx );
-unsigned
-tgsi_num_tokens(const struct tgsi_token *tokens);
+static INLINE unsigned
+tgsi_num_tokens(const struct tgsi_token *tokens)
+{
+ struct tgsi_header header = *(const struct tgsi_header *) tokens;
+ return header.HeaderSize + header.BodySize;
+}
+
+void
+tgsi_dump_tokens(const struct tgsi_token *tokens);
struct tgsi_token *
tgsi_dup_tokens(const struct tgsi_token *tokens);