From c5f2cd6e4102fba54059dcc51d7ba28f777e5991 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Wed, 31 Jul 2013 18:31:44 +0100 Subject: [PATCH] trace: Handle null tokens. Used for example on stream out without geometry shader. --- src/gallium/drivers/trace/tr_dump_state.c | 8 ++++++-- 1 file 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"); -- 2.30.2