2025-01-15 21:45:32 -08:00
|
|
|
/*
|
|
|
|
|
* Copyright © 2025 Intel Corporation
|
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
|
|
#include "intel/decoder/intel_decoder.h"
|
|
|
|
|
|
2025-10-06 14:25:26 -07:00
|
|
|
#include "compiler/brw/brw_isa_info.h"
|
2025-04-30 12:16:38 -07:00
|
|
|
#ifdef INTEL_USE_ELK
|
|
|
|
|
#include "compiler/elk/elk_isa_info.h"
|
|
|
|
|
#endif
|
|
|
|
|
|
2025-01-15 21:45:32 -08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
struct intel_device_info;
|
|
|
|
|
|
2025-04-30 12:16:38 -07:00
|
|
|
struct intel_isa_info {
|
|
|
|
|
union {
|
|
|
|
|
struct brw_isa_info brw_isa;
|
|
|
|
|
#ifdef INTEL_USE_ELK
|
|
|
|
|
struct elk_isa_info elk_isa;
|
|
|
|
|
#endif
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2025-01-15 21:45:32 -08:00
|
|
|
/* Helpers to abstract some BRW/ELK differences. */
|
|
|
|
|
|
|
|
|
|
void intel_disassemble(const struct intel_device_info *devinfo,
|
|
|
|
|
const void *assembly, int start, FILE *out);
|
|
|
|
|
|
|
|
|
|
void intel_decoder_init(struct intel_batch_decode_ctx *ctx,
|
2025-04-30 12:16:38 -07:00
|
|
|
struct intel_isa_info *isa_info,
|
2025-01-15 21:45:32 -08:00
|
|
|
const struct intel_device_info *devinfo,
|
|
|
|
|
FILE *fp, enum intel_batch_decode_flags flags,
|
|
|
|
|
const char *xml_path,
|
|
|
|
|
struct intel_batch_decode_bo (*get_bo)(void *, bool, uint64_t),
|
|
|
|
|
unsigned (*get_state_size)(void *, uint64_t, uint64_t),
|
|
|
|
|
void *user_data);
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|