From: Lionel Landwerlin Date: Wed, 19 Dec 2018 17:52:06 +0000 (+0000) Subject: intel/aub_viewer: fix shader view X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7ab8c8062510ef1b3f01bef0e3b16c60ea311857;p=mesa.git intel/aub_viewer: fix shader view Not decoding the shader at the right offset. Signed-off-by: Lionel Landwerlin Reviewed-by: Tapani Pälli --- diff --git a/src/intel/tools/aubinator_viewer.cpp b/src/intel/tools/aubinator_viewer.cpp index 47eba274dac..fe936154381 100644 --- a/src/intel/tools/aubinator_viewer.cpp +++ b/src/intel/tools/aubinator_viewer.cpp @@ -392,7 +392,9 @@ new_shader_window(struct aub_mem *mem, uint64_t address, const char *desc) if (shader_bo.map) { FILE *f = open_memstream(&window->shader, &window->shader_size); if (f) { - gen_disasm_disassemble(context.file->disasm, shader_bo.map, 0, f); + gen_disasm_disassemble(context.file->disasm, + (const uint8_t *) shader_bo.map + + (address - shader_bo.addr), 0, f); fclose(f); } }