[Mesa-dev] [PATCH 02/11] gallium/util: dump tokens in util_dump_shader_state only if type is TGSI
Nicolai Hähnle
nhaehnle at gmail.com
Mon May 8 15:35:52 UTC 2017
From: Nicolai Hähnle <nicolai.haehnle at amd.com>
---
src/gallium/auxiliary/util/u_dump_state.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/gallium/auxiliary/util/u_dump_state.c b/src/gallium/auxiliary/util/u_dump_state.c
index 9bb9095..bf27a4e 100644
--- a/src/gallium/auxiliary/util/u_dump_state.c
+++ b/src/gallium/auxiliary/util/u_dump_state.c
@@ -456,25 +456,27 @@ util_dump_shader_state(FILE *stream, const struct pipe_shader_state *state)
{
unsigned i;
if (!state) {
util_dump_null(stream);
return;
}
util_dump_struct_begin(stream, "pipe_shader_state");
- util_dump_member_begin(stream, "tokens");
- fprintf(stream, "\"\n");
- tgsi_dump_to_file(state->tokens, 0, stream);
- fprintf(stream, "\"");
- util_dump_member_end(stream);
+ if (state->type == PIPE_SHADER_IR_TGSI) {
+ util_dump_member_begin(stream, "tokens");
+ fprintf(stream, "\"\n");
+ tgsi_dump_to_file(state->tokens, 0, stream);
+ fprintf(stream, "\"");
+ util_dump_member_end(stream);
+ }
if (state->stream_output.num_outputs) {
util_dump_member_begin(stream, "stream_output");
util_dump_struct_begin(stream, "pipe_stream_output_info");
util_dump_member(stream, uint, &state->stream_output, num_outputs);
util_dump_array(stream, uint, state->stream_output.stride,
ARRAY_SIZE(state->stream_output.stride));
util_dump_array_begin(stream);
for(i = 0; i < state->stream_output.num_outputs; ++i) {
util_dump_elem_begin(stream);
--
2.9.3
More information about the mesa-dev
mailing list