i965/gen8: add debug code to show FS disasm with jump locations
authorJordan Justen <jordan.l.justen@intel.com>
Sat, 12 Apr 2014 00:22:46 +0000 (17:22 -0700)
committerJordan Justen <jordan.l.justen@intel.com>
Mon, 14 Apr 2014 17:32:42 +0000 (10:32 -0700)
Copied from similar code in gen8_vec4_generator.cpp.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/gen8_fs_generator.cpp

index bb141485d6e166411c87fd31781e882054095df1..ef95eb0275e08a77672d2bb6adb32e4c2b09a329 100644 (file)
@@ -1268,6 +1268,15 @@ gen8_fs_generator::generate_code(exec_list *instructions)
    }
 
    patch_jump_targets();
+
+   /* OK, while the INTEL_DEBUG=fs above is very nice for debugging FS
+    * emit issues, it doesn't get the jump distances into the output,
+    * which is often something we want to debug.  So this is here in
+    * case you're doing that.
+    */
+   if (0 && unlikely(INTEL_DEBUG & DEBUG_WM)) {
+      disassemble(stderr, 0, next_inst_offset);
+   }
 }
 
 const unsigned *