intel/decoder: tools: Use engine for decoding batch instructions
The engine to which the batch was sent to is now set to the decoder context when decoding the batch. This is needed so that we can distinguish between instructions as the render and video pipe share some of the instruction opcodes. v2: The engine is now in the decoder context and the batch decoder uses a local function for finding the instruction for an engine. v3: Spec uses engine_mask now instead of engine, replaced engine class enums with the definitions from UAPI. v4: Fix up aubinator_viewer (Lionel) Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
This commit is contained in:
committed by
Lionel Landwerlin
parent
a6aab7e436
commit
102dadec81
@@ -42,6 +42,7 @@ aub_viewer_decode_ctx_init(struct aub_viewer_decode_ctx *ctx,
|
||||
ctx->get_bo = get_bo;
|
||||
ctx->get_state_size = get_state_size;
|
||||
ctx->user_data = user_data;
|
||||
ctx->engine = I915_ENGINE_CLASS_RENDER;
|
||||
|
||||
ctx->cfg = cfg;
|
||||
ctx->decode_cfg = decode_cfg;
|
||||
@@ -871,7 +872,7 @@ aub_viewer_render_batch(struct aub_viewer_decode_ctx *ctx,
|
||||
int length;
|
||||
|
||||
for (p = batch; p < end; p += length) {
|
||||
inst = gen_spec_find_instruction(ctx->spec, p);
|
||||
inst = gen_spec_find_instruction(ctx->spec, ctx->engine, p);
|
||||
length = gen_group_get_length(inst, p);
|
||||
assert(inst == NULL || length > 0);
|
||||
length = MAX2(1, length);
|
||||
|
||||
Reference in New Issue
Block a user