Module: Mesa
Branch: master
Commit: fa1519d0c96616e9cb3f7869864dcccb805ec89d
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=fa1519d0c96616e9cb3f7869864dcccb805ec89d

Author: Nicolai Hähnle <nicolai.haeh...@amd.com>
Date:   Mon May  8 17:29:03 2017 +0200

gallium/util: dump tokens in util_dump_shader_state only if type is TGSI

Reviewed-by: Marek Olšák <marek.ol...@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 9bb9095938..bf27a4e0ee 100644
--- a/src/gallium/auxiliary/util/u_dump_state.c
+++ b/src/gallium/auxiliary/util/u_dump_state.c
@@ -463,11 +463,13 @@ util_dump_shader_state(FILE *stream, const struct 
pipe_shader_state *state)
 
    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");

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to