summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/trace/tr_dump_state.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/drivers/trace/tr_dump_state.c b/src/gallium/drivers/trace/tr_dump_state.c
index 7d10df7ba00..e11f866b42e 100644
--- a/src/gallium/drivers/trace/tr_dump_state.c
+++ b/src/gallium/drivers/trace/tr_dump_state.c
@@ -266,12 +266,16 @@ void trace_dump_shader_state(const struct pipe_shader_state *state)
return;
}
- tgsi_dump_str(state->tokens, 0, str, sizeof(str));
trace_dump_struct_begin("pipe_shader_state");
trace_dump_member_begin("tokens");
- trace_dump_string(str);
+ if (state->tokens) {
+ tgsi_dump_str(state->tokens, 0, str, sizeof(str));
+ trace_dump_string(str);
+ } else {
+ trace_dump_null();
+ }
trace_dump_member_end();
trace_dump_member_begin("stream_output");