intel/tools: Add ELK support for aubinator_error_decode
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27563>
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user