diff options
author | José Fonseca <[email protected]> | 2013-07-31 18:31:44 +0100 |
---|---|---|
committer | José Fonseca <[email protected]> | 2013-08-22 12:14:15 +0100 |
commit | c5f2cd6e4102fba54059dcc51d7ba28f777e5991 (patch) | |
tree | cba0eafca1c4aeac26a597019ec55f28808a15bf /src/gallium/drivers | |
parent | b6037e734ee22849cea05a3c92d908e5f92a79fb (diff) |
trace: Handle null tokens.
Used for example on stream out without geometry shader.
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/trace/tr_dump_state.c | 8 |
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"); |