diff --git a/src/intel/tools/aubinator_error_decode.c b/src/intel/tools/aubinator_error_decode.c index 107b8dbb0c0..778ea949260 100644 --- a/src/intel/tools/aubinator_error_decode.c +++ b/src/intel/tools/aubinator_error_decode.c @@ -40,6 +40,7 @@ #include "aubinator_error_decode_xe.h" #include "compiler/brw_compiler.h" +#include "compiler/elk/elk_compiler.h" #include "decoder/intel_decoder.h" #include "dev/intel_debug.h" #include "util/macros.h" @@ -442,7 +443,8 @@ read_i915_data_file(FILE *file) bool ring_wraps = false; char *ring_name = NULL; struct intel_device_info devinfo; - struct brw_isa_info isa; + struct brw_isa_info brw; + struct elk_isa_info elk; uint64_t acthd = 0; while (getline(&line, &line_size, file) > 0) { @@ -535,7 +537,10 @@ read_i915_data_file(FILE *file) printf("Detected GEN%i chipset\n", devinfo.ver); - brw_init_isa_info(&isa, &devinfo); + if (devinfo.ver >= 9) + brw_init_isa_info(&brw, &devinfo); + else + elk_init_isa_info(&elk, &devinfo); if (xml_path == NULL) spec = intel_spec_load(&devinfo); @@ -737,9 +742,15 @@ read_i915_data_file(FILE *file) batch_flags |= INTEL_BATCH_DECODE_FLOATS; struct intel_batch_decode_ctx batch_ctx; - intel_batch_decode_ctx_init_brw(&batch_ctx, &isa, &devinfo, stdout, - batch_flags, xml_path, get_intel_batch_bo, - NULL, NULL); + if (devinfo.ver >= 9) { + intel_batch_decode_ctx_init_brw(&batch_ctx, &brw, &devinfo, stdout, + batch_flags, xml_path, get_intel_batch_bo, + NULL, NULL); + } else { + intel_batch_decode_ctx_init_elk(&batch_ctx, &elk, &devinfo, stdout, + batch_flags, xml_path, get_intel_batch_bo, + NULL, NULL); + } batch_ctx.acthd = acthd; if (option_dump_kernels) diff --git a/src/intel/tools/meson.build b/src/intel/tools/meson.build index c58b6f74769..87a1948bdd9 100644 --- a/src/intel/tools/meson.build +++ b/src/intel/tools/meson.build @@ -46,9 +46,10 @@ aubinator_error_decode = executable( files('aubinator_error_decode.c', 'aubinator_error_decode_xe.c', 'aubinator_error_decode_xe.h'), - dependencies : [idep_mesautil, dep_zlib, dep_thread, idep_intel_dev, idep_intel_decoder_brw], + dependencies : [idep_mesautil, dep_zlib, dep_thread, idep_intel_dev, + idep_intel_decoder_brw, idep_intel_decoder_elk], include_directories : [inc_include, inc_src, inc_intel], - link_with : [libintel_common, libintel_compiler], + link_with : [libintel_common, libintel_compiler, libintel_compiler_elk], c_args : [no_override_init_args], gnu_symbol_visibility : 'hidden', install : true