Mesa (master): i965: Add INTEL_DEBUG= hex to print the hex with the disassembly.

Matt Turner mattst88 at kemper.freedesktop.org
Fri Oct 30 00:51:16 UTC 2015


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

Author: Matt Turner <mattst88 at gmail.com>
Date:   Sun Oct 25 19:05:56 2015 -0700

i965: Add INTEL_DEBUG=hex to print the hex with the disassembly.

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/mesa/drivers/dri/i965/brw_eu.c      |    2 +-
 src/mesa/drivers/dri/i965/intel_debug.c |    1 +
 src/mesa/drivers/dri/i965/intel_debug.h |    1 +
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_eu.c b/src/mesa/drivers/dri/i965/brw_eu.c
index 1f4a351..40ec87d 100644
--- a/src/mesa/drivers/dri/i965/brw_eu.c
+++ b/src/mesa/drivers/dri/i965/brw_eu.c
@@ -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;
diff --git a/src/mesa/drivers/dri/i965/intel_debug.c b/src/mesa/drivers/dri/i965/intel_debug.c
index f7c02c8..31821af 100644
--- a/src/mesa/drivers/dri/i965/intel_debug.c
+++ b/src/mesa/drivers/dri/i965/intel_debug.c
@@ -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 }
 };
 
diff --git a/src/mesa/drivers/dri/i965/intel_debug.h b/src/mesa/drivers/dri/i965/intel_debug.h
index 0a6e1b9..25ea32c 100644
--- a/src/mesa/drivers/dri/i965/intel_debug.h
+++ b/src/mesa/drivers/dri/i965/intel_debug.h
@@ -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"




More information about the mesa-commit mailing list