From: José Fonseca Date: Wed, 31 Jul 2013 17:31:44 +0000 (+0100) Subject: trace: Handle null tokens. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c5f2cd6e4102fba54059dcc51d7ba28f777e5991;p=mesa.git trace: Handle null tokens. Used for example on stream out without geometry shader. --- 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");