summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/trace/tr_state.c
diff options
context:
space:
mode:
authorJosé Fonseca <jrfonseca@tungstengraphics.com>2008-08-09 11:52:53 +0100
committerJosé Fonseca <jrfonseca@tungstengraphics.com>2008-08-09 14:10:25 +0100
commit696067e781977ad54bb31b3843355701124f1b22 (patch)
treecd5e9420eb109c817060295e021576434be87663 /src/gallium/drivers/trace/tr_state.c
parent673489fa5cde4ce8d49918f20f007201a17bc45e (diff)
trace: Dump shaders as text.
Diffstat (limited to 'src/gallium/drivers/trace/tr_state.c')
-rw-r--r--src/gallium/drivers/trace/tr_state.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gallium/drivers/trace/tr_state.c b/src/gallium/drivers/trace/tr_state.c
index e0e48185fa..9ffe77146d 100644
--- a/src/gallium/drivers/trace/tr_state.c
+++ b/src/gallium/drivers/trace/tr_state.c
@@ -27,7 +27,7 @@
#include "pipe/p_compiler.h"
-#include "tgsi/tgsi_parse.h"
+#include "tgsi/tgsi_dump.h"
#include "tr_dump.h"
#include "tr_state.h"
@@ -240,18 +240,19 @@ void trace_dump_constant_buffer(struct trace_stream *stream,
void trace_dump_shader_state(struct trace_stream *stream,
const struct pipe_shader_state *state)
{
+ static char str[8192];
assert(state);
if(!state) {
trace_dump_null(stream);
return;
}
+ tgsi_dump_str(state->tokens, 0, str, sizeof(str));
+
trace_dump_struct_begin(stream, "pipe_shader_state");
trace_dump_member_begin(stream, "tokens");
- trace_dump_bytes(stream,
- state->tokens,
- sizeof(struct tgsi_token) * tgsi_num_tokens(state->tokens));
+ trace_dump_string(stream, str);
trace_dump_member_end(stream);
trace_dump_struct_end(stream);