projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b6037e7
)
trace: Handle null tokens.
author
José Fonseca
<jfonseca@vmware.com>
Wed, 31 Jul 2013 17:31:44 +0000
(18:31 +0100)
committer
José Fonseca
<jfonseca@vmware.com>
Thu, 22 Aug 2013 11:14:15 +0000
(12:14 +0100)
Used for example on stream out without geometry shader.
src/gallium/drivers/trace/tr_dump_state.c
patch
|
blob
|
history
diff --git
a/src/gallium/drivers/trace/tr_dump_state.c
b/src/gallium/drivers/trace/tr_dump_state.c
index 7d10df7ba009695efdd29e10ebc1cc4a07433bcf..e11f866b42e94bb400899e025fbf0147af43cd0d 100644
(file)
--- 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");