From: Kevin Rogovin <kevin.rogo...@intel.com> Signed-off-by: Kevin Rogovin <kevin.rogo...@intel.com> --- src/intel/compiler/brw_eu.c | 11 ++++++++++- src/intel/compiler/brw_eu.h | 3 +++ 2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/src/intel/compiler/brw_eu.c b/src/intel/compiler/brw_eu.c index bc297a21b3..8969ae5bda 100644 --- a/src/intel/compiler/brw_eu.c +++ b/src/intel/compiler/brw_eu.c @@ -339,6 +339,15 @@ const unsigned *brw_get_program( struct brw_codegen *p, void brw_disassemble(const struct gen_device_info *devinfo, const void *assembly, int start, int end, FILE *out) +{ + brw_disassemble_print_offset_option(devinfo, assembly, start, end, out, + false); +} + +void +brw_disassemble_print_offset_option(const struct gen_device_info *devinfo, + const void *assembly, int start, int end, + FILE *out, bool print_offsets) { bool dump_hex = (INTEL_DEBUG & DEBUG_HEX) != 0; @@ -346,7 +355,7 @@ brw_disassemble(const struct gen_device_info *devinfo, const brw_inst *insn = assembly + offset; brw_inst uncompacted; bool compacted = brw_inst_cmpt_control(devinfo, insn); - if (0) + if (print_offsets) fprintf(out, "0x%08x: ", offset); if (compacted) { diff --git a/src/intel/compiler/brw_eu.h b/src/intel/compiler/brw_eu.h index 95503d5513..497cf9e575 100644 --- a/src/intel/compiler/brw_eu.h +++ b/src/intel/compiler/brw_eu.h @@ -128,6 +128,9 @@ int brw_disassemble_inst(FILE *file, const struct gen_device_info *devinfo, const struct brw_inst *inst, bool is_compacted); void brw_disassemble(const struct gen_device_info *devinfo, const void *assembly, int start, int end, FILE *out); +void brw_disassemble_print_offset_option(const struct gen_device_info *devinfo, + const void *assembly, int start, int end, + FILE *out, bool print_offsets); const unsigned *brw_get_program( struct brw_codegen *p, unsigned *sz ); brw_inst *brw_next_insn(struct brw_codegen *p, unsigned opcode); -- 2.14.2 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev