intel/tools: Handle milti-LRI in the batch decoder
Context batches tend to have a lot of multi-LRI and, if we want to be able to parse those registers nicely, we really handle it. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9729>
This commit is contained in:
parent
65077cdf57
commit
b2421f7b44
|
@ -855,12 +855,18 @@ decode_3dstate_slice_table_state_pointers(struct intel_batch_decode_ctx *ctx,
|
||||||
static void
|
static void
|
||||||
decode_load_register_imm(struct intel_batch_decode_ctx *ctx, const uint32_t *p)
|
decode_load_register_imm(struct intel_batch_decode_ctx *ctx, const uint32_t *p)
|
||||||
{
|
{
|
||||||
struct intel_group *reg = intel_spec_find_register(ctx->spec, p[1]);
|
struct intel_group *inst = intel_ctx_find_instruction(ctx, p);
|
||||||
|
const unsigned length = intel_group_get_length(inst, p);
|
||||||
|
assert(length & 1);
|
||||||
|
const unsigned nr_regs = (length - 1) / 2;
|
||||||
|
|
||||||
if (reg != NULL) {
|
for (unsigned i = 0; i < nr_regs; i++) {
|
||||||
fprintf(ctx->fp, "register %s (0x%x): 0x%x\n",
|
struct intel_group *reg = intel_spec_find_register(ctx->spec, p[i * 2 + 1]);
|
||||||
reg->name, reg->register_offset, p[2]);
|
if (reg != NULL) {
|
||||||
ctx_print_group(ctx, reg, reg->register_offset, &p[2]);
|
fprintf(ctx->fp, "register %s (0x%x): 0x%x\n",
|
||||||
|
reg->name, reg->register_offset, p[2]);
|
||||||
|
ctx_print_group(ctx, reg, reg->register_offset, &p[2]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue