mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-30 12:10:09 +01:00
intel/tools: Add ELK support for aubinator
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27563>
This commit is contained in:
parent
9796b56e41
commit
5338a24fe0
2 changed files with 16 additions and 10 deletions
|
|
@ -39,6 +39,7 @@
|
|||
#include <sys/mman.h>
|
||||
|
||||
#include "intel/compiler/brw_isa_info.h"
|
||||
#include "intel/compiler/elk/elk_isa_info.h"
|
||||
#include "util/macros.h"
|
||||
|
||||
#include "aub_read.h"
|
||||
|
|
@ -60,14 +61,13 @@ static enum { COLOR_AUTO, COLOR_ALWAYS, COLOR_NEVER } option_color;
|
|||
uint16_t pci_id = 0;
|
||||
char *input_file = NULL, *xml_path = NULL;
|
||||
struct intel_device_info devinfo;
|
||||
struct brw_isa_info isa;
|
||||
struct brw_isa_info brw;
|
||||
struct elk_isa_info elk;
|
||||
struct intel_batch_decode_ctx batch_ctx;
|
||||
struct aub_mem mem;
|
||||
|
||||
FILE *outfile;
|
||||
|
||||
struct brw_instruction;
|
||||
|
||||
static void
|
||||
aubinator_error(void *user_data, const void *aub_data, const char *msg)
|
||||
{
|
||||
|
|
@ -90,8 +90,6 @@ aubinator_init(void *user_data, int aub_pci_id, const char *app_name)
|
|||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
brw_init_isa_info(&isa, &devinfo);
|
||||
|
||||
enum intel_batch_decode_flags batch_flags = 0;
|
||||
if (option_color == COLOR_ALWAYS)
|
||||
batch_flags |= INTEL_BATCH_DECODE_IN_COLOR;
|
||||
|
|
@ -101,8 +99,15 @@ aubinator_init(void *user_data, int aub_pci_id, const char *app_name)
|
|||
batch_flags |= INTEL_BATCH_DECODE_OFFSETS;
|
||||
batch_flags |= INTEL_BATCH_DECODE_FLOATS;
|
||||
|
||||
intel_batch_decode_ctx_init_brw(&batch_ctx, &isa, &devinfo, outfile,
|
||||
batch_flags, xml_path, NULL, NULL, NULL);
|
||||
if (devinfo.ver >= 9) {
|
||||
brw_init_isa_info(&brw, &devinfo);
|
||||
intel_batch_decode_ctx_init_brw(&batch_ctx, &brw, &devinfo, outfile,
|
||||
batch_flags, xml_path, NULL, NULL, NULL);
|
||||
} else {
|
||||
elk_init_isa_info(&elk, &devinfo);
|
||||
intel_batch_decode_ctx_init_elk(&batch_ctx, &elk, &devinfo, outfile,
|
||||
batch_flags, xml_path, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
/* Check for valid spec instance, if wrong xml_path is passed then spec
|
||||
* instance is not initialized properly
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ libaub = static_library(
|
|||
'aub',
|
||||
files('aub_read.c', 'aub_mem.c'),
|
||||
include_directories : [inc_include, inc_src, inc_intel],
|
||||
dependencies : [idep_mesautil, idep_intel_dev, idep_intel_decoder_brw],
|
||||
dependencies : [idep_mesautil, idep_intel_dev, idep_intel_decoder_brw, idep_intel_decoder_elk],
|
||||
link_with : [libintel_common],
|
||||
c_args : [no_override_init_args],
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
|
|
@ -32,9 +32,10 @@ libaub = static_library(
|
|||
aubinator = executable(
|
||||
'aubinator',
|
||||
files('aubinator.c'),
|
||||
dependencies : [idep_mesautil, dep_expat, dep_zlib, dep_dl, dep_thread, dep_m, idep_intel_dev, idep_intel_decoder_brw],
|
||||
dependencies : [idep_mesautil, dep_expat, dep_zlib, dep_dl, dep_thread, dep_m, 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, libaub],
|
||||
link_with : [libintel_common, libintel_compiler, libintel_compiler_elk, libaub],
|
||||
c_args : [no_override_init_args],
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
install : true
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue