Mesa (master): i965/vec4: slightly improve insn dumping with no srcs

Chris Forbes chrisf at kemper.freedesktop.org
Tue Sep 16 20:36:16 UTC 2014


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

Author: Chris Forbes <chrisf at ijw.co.nz>
Date:   Tue Sep  9 19:55:28 2014 +1200

i965/vec4: slightly improve insn dumping with no srcs

Previously, we would get a trailing ', ' which looked strange.

Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/mesa/drivers/dri/i965/brw_vec4.cpp |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index 0f13c0d..9102be2 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -1337,7 +1337,10 @@ vec4_visitor::dump_instruction(backend_instruction *be_inst, FILE *file)
       if (inst->dst.writemask & 8)
          fprintf(file, "w");
    }
-   fprintf(file, ":%s, ", brw_reg_type_letters(inst->dst.type));
+   fprintf(file, ":%s", brw_reg_type_letters(inst->dst.type));
+
+   if (inst->src[0].file != BAD_FILE)
+      fprintf(file, ", ");
 
    for (int i = 0; i < 3 && inst->src[i].file != BAD_FILE; i++) {
       if (inst->src[i].negate)




More information about the mesa-commit mailing list