i965: Add INTEL_DEBUG=hex to print the hex with the disassembly.
authorMatt Turner <mattst88@gmail.com>
Mon, 26 Oct 2015 02:05:56 +0000 (19:05 -0700)
committerMatt Turner <mattst88@gmail.com>
Fri, 30 Oct 2015 00:51:16 +0000 (17:51 -0700)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_eu.c
src/mesa/drivers/dri/i965/intel_debug.c
src/mesa/drivers/dri/i965/intel_debug.h

index 1f4a351..40ec87d 100644 (file)
@@ -261,7 +261,7 @@ void
 brw_disassemble(const struct brw_device_info *devinfo,
                 void *assembly, int start, int end, FILE *out)
 {
-   bool dump_hex = false;
+   bool dump_hex = (INTEL_DEBUG & DEBUG_HEX) != 0;
 
    for (int offset = start; offset < end;) {
       brw_inst *insn = assembly + offset;
index f7c02c8..31821af 100644 (file)
@@ -73,6 +73,7 @@ static const struct debug_control debug_control[] = {
    { "spill_fs",    DEBUG_SPILL_FS },
    { "spill_vec4",  DEBUG_SPILL_VEC4 },
    { "cs",          DEBUG_CS },
+   { "hex",         DEBUG_HEX },
    { NULL,    0 }
 };
 
index 0a6e1b9..25ea32c 100644 (file)
@@ -67,6 +67,7 @@ extern uint64_t INTEL_DEBUG;
 #define DEBUG_SPILL_FS            (1ull << 31)
 #define DEBUG_SPILL_VEC4          (1ull << 32)
 #define DEBUG_CS                  (1ull << 33)
+#define DEBUG_HEX                 (1ull << 34)
 
 #ifdef HAVE_ANDROID_PLATFORM
 #define LOG_TAG "INTEL-MESA"