diff --git a/src/intel/tools/aubinator_viewer.cpp b/src/intel/tools/aubinator_viewer.cpp index 6850d478480..0df122cdb5a 100644 --- a/src/intel/tools/aubinator_viewer.cpp +++ b/src/intel/tools/aubinator_viewer.cpp @@ -41,6 +41,8 @@ #include "compiler/brw_disasm.h" #include "compiler/brw_isa_info.h" +#include "compiler/elk/elk_disasm.h" +#include "compiler/elk/elk_isa_info.h" #define xtzalloc(name) ((decltype(&name)) calloc(1, sizeof(name))) #define xtalloc(name) ((decltype(&name)) malloc(sizeof(name))) @@ -63,7 +65,8 @@ struct aub_file { /* Device state */ struct intel_device_info devinfo; - struct brw_isa_info isa; + struct brw_isa_info brw; + struct elk_isa_info elk; struct intel_spec *spec; }; @@ -131,7 +134,10 @@ handle_info(void *user_data, int pci_id, const char *app_name) fprintf(stderr, "can't find device information: pci_id=0x%x\n", file->pci_id); exit(EXIT_FAILURE); } - brw_init_isa_info(&file->isa, &file->devinfo); + if (file->devinfo.ver >= 9) + brw_init_isa_info(&file->brw, &file->devinfo); + else + elk_init_isa_info(&file->elk, &file->devinfo); file->spec = intel_spec_load(&file->devinfo); } @@ -395,9 +401,15 @@ 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) { - brw_disassemble_with_errors(&context.file->isa, - (const uint8_t *) shader_bo.map + - (address - shader_bo.addr), 0, f); + if (context.file->devinfo.ver >= 9) { + brw_disassemble_with_errors(&context.file->brw, + (const uint8_t *) shader_bo.map + + (address - shader_bo.addr), 0, f); + } else { + elk_disassemble_with_errors(&context.file->elk, + (const uint8_t *) shader_bo.map + + (address - shader_bo.addr), 0, f); + } fclose(f); } } diff --git a/src/intel/tools/meson.build b/src/intel/tools/meson.build index 44ce41b0a8f..12073a4a7fc 100644 --- a/src/intel/tools/meson.build +++ b/src/intel/tools/meson.build @@ -165,7 +165,7 @@ if with_tools.contains('intel-ui') files('aubinator_viewer.cpp', 'aubinator_viewer_decoder.cpp'), dependencies : [idep_mesautil, dep_zlib, dep_dl, dep_thread, dep_m, libintel_imgui_gtk_dep, idep_intel_dev], include_directories : [inc_include, inc_src, inc_intel], - link_with : [libintel_common, libintel_compiler, libaub], + link_with : [libintel_common, libintel_compiler, libintel_compiler_elk, libaub], c_args : [no_override_init_args], gnu_symbol_visibility : 'hidden', cpp_args : ['-fpermissive', '-Wno-parentheses'],