diff options
author | Keith Whitwell <keithw@vmware.com> | 2009-11-06 11:21:48 +0000 |
---|---|---|
committer | Keith Whitwell <keithw@vmware.com> | 2009-11-06 11:45:01 +0000 |
commit | 381cd2d63f4aae29d478e02dda5a978a668168e1 (patch) | |
tree | 0c490e3d4ad527c45885bc01ca86f74c1fb76af1 | |
parent | aab9601a753afd012e16df072e774a32eb1348b9 (diff) | |
download | external_mesa3d-381cd2d63f4aae29d478e02dda5a978a668168e1.zip external_mesa3d-381cd2d63f4aae29d478e02dda5a978a668168e1.tar.gz external_mesa3d-381cd2d63f4aae29d478e02dda5a978a668168e1.tar.bz2 |
i965g: disassemble each instruction as generated
-rw-r--r-- | src/gallium/drivers/i965/brw_context.h | 1 | ||||
-rw-r--r-- | src/gallium/drivers/i965/brw_debug.h | 2 | ||||
-rw-r--r-- | src/gallium/drivers/i965/brw_disasm.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/i965/brw_eu_emit.c | 7 | ||||
-rw-r--r-- | src/gallium/drivers/i965/brw_screen.c | 1 |
5 files changed, 11 insertions, 2 deletions
diff --git a/src/gallium/drivers/i965/brw_context.h b/src/gallium/drivers/i965/brw_context.h index b81dff0..05fc9d4 100644 --- a/src/gallium/drivers/i965/brw_context.h +++ b/src/gallium/drivers/i965/brw_context.h @@ -788,6 +788,7 @@ int brw_upload_urb_fence(struct brw_context *brw); int brw_upload_cs_urb_state(struct brw_context *brw); /* brw_disasm.c */ +int brw_disasm_insn (FILE *file, const struct brw_instruction *inst); int brw_disasm (FILE *file, const struct brw_instruction *inst, unsigned count); diff --git a/src/gallium/drivers/i965/brw_debug.h b/src/gallium/drivers/i965/brw_debug.h index ea3c872..0deddbf 100644 --- a/src/gallium/drivers/i965/brw_debug.h +++ b/src/gallium/drivers/i965/brw_debug.h @@ -16,7 +16,7 @@ #define DEBUG_PIXEL 0x100 #define DEBUG_BUFMGR 0x200 #define DEBUG_MIN_URB 0x400 -#define DEBUG_unused2 0x800 +#define DEBUG_DISASSEM 0x800 #define DEBUG_unused3 0x1000 #define DEBUG_SYNC 0x2000 #define DEBUG_PRIMS 0x4000 diff --git a/src/gallium/drivers/i965/brw_disasm.c b/src/gallium/drivers/i965/brw_disasm.c index df0c7b9..4100f11 100644 --- a/src/gallium/drivers/i965/brw_disasm.c +++ b/src/gallium/drivers/i965/brw_disasm.c @@ -770,7 +770,7 @@ static int src1 (FILE *file, const struct brw_instruction *inst) } } -static int brw_disasm_insn (FILE *file, const struct brw_instruction *inst) +int brw_disasm_insn (FILE *file, const struct brw_instruction *inst) { int err = 0; int space = 0; diff --git a/src/gallium/drivers/i965/brw_eu_emit.c b/src/gallium/drivers/i965/brw_eu_emit.c index f7fa520..7776b4f 100644 --- a/src/gallium/drivers/i965/brw_eu_emit.c +++ b/src/gallium/drivers/i965/brw_eu_emit.c @@ -33,6 +33,7 @@ #include "brw_context.h" #include "brw_defines.h" #include "brw_eu.h" +#include "brw_debug.h" @@ -473,6 +474,12 @@ static struct brw_instruction *next_insn( struct brw_compile *p, { struct brw_instruction *insn; + if (0 && (BRW_DEBUG & DEBUG_DISASSEM)) + { + if (p->nr_insn) + brw_disasm_insn(stderr, &p->store[p->nr_insn-1]); + } + assert(p->nr_insn + 1 < BRW_EU_MAX_INSN); insn = &p->store[p->nr_insn++]; diff --git a/src/gallium/drivers/i965/brw_screen.c b/src/gallium/drivers/i965/brw_screen.c index 275ff09..9d80664 100644 --- a/src/gallium/drivers/i965/brw_screen.c +++ b/src/gallium/drivers/i965/brw_screen.c @@ -49,6 +49,7 @@ static const struct debug_named_value debug_names[] = { { "pix", DEBUG_PIXEL}, { "buf", DEBUG_BUFMGR}, { "min", DEBUG_MIN_URB}, + { "dis", DEBUG_DISASSEM}, { "sync", DEBUG_SYNC}, { "prim", DEBUG_PRIMS }, { "vert", DEBUG_VERTS }, |