mesa/src/intel/tools/intel_tools.h
Caio Oliveira ec2d20a70d intel/tools: Add helpers for decoder_init/disasm
Isolate the BRW/ELK differences in a single place.  The way is done now,
we are not reusing the isa_info between calls.  For the tools here this
is probably fine, if its someday this gets in the way, we can add an
opaque pointer to store the right data.

This intentionally is not used in Iris, since there the driver need more
detailed view into BRW/ELK and we don't want to create an all
encompassing abstraction for that.

Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33054>
2025-01-30 00:45:59 +00:00

33 lines
889 B
C

/*
* Copyright © 2025 Intel Corporation
* SPDX-License-Identifier: MIT
*/
#pragma once
#include <stdio.h>
#include "intel/decoder/intel_decoder.h"
#ifdef __cplusplus
extern "C" {
#endif
struct intel_device_info;
/* 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,
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