From 7ab8c8062510ef1b3f01bef0e3b16c60ea311857 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Wed, 19 Dec 2018 17:52:06 +0000 Subject: [PATCH] intel/aub_viewer: fix shader view MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Not decoding the shader at the right offset. Signed-off-by: Lionel Landwerlin Reviewed-by: Tapani Pälli --- src/intel/tools/aubinator_viewer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); } } -- 2.30.2