diff options
Diffstat (limited to 'src/intel/tools')
-rw-r--r-- | src/intel/tools/aubinator_viewer.h | 2 | ||||
-rw-r--r-- | src/intel/tools/aubinator_viewer_decoder.cpp | 10 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/intel/tools/aubinator_viewer.h b/src/intel/tools/aubinator_viewer.h index 16812925515..65c679f85de 100644 --- a/src/intel/tools/aubinator_viewer.h +++ b/src/intel/tools/aubinator_viewer.h @@ -82,6 +82,8 @@ struct aub_viewer_decode_ctx { enum aub_decode_stage stage; uint32_t end_urb_offset; struct aub_decode_urb_stage_state urb_stages[AUB_DECODE_N_STAGE]; + + int n_batch_buffer_start; }; void aub_viewer_decode_ctx_init(struct aub_viewer_decode_ctx *ctx, diff --git a/src/intel/tools/aubinator_viewer_decoder.cpp b/src/intel/tools/aubinator_viewer_decoder.cpp index b946fb33e0c..f9586590221 100644 --- a/src/intel/tools/aubinator_viewer_decoder.cpp +++ b/src/intel/tools/aubinator_viewer_decoder.cpp @@ -898,6 +898,14 @@ aub_viewer_render_batch(struct aub_viewer_decode_ctx *ctx, const uint32_t *p, *batch = (const uint32_t *) _batch, *end = batch + batch_size / sizeof(uint32_t); int length; + if (ctx->n_batch_buffer_start >= 100) { + ImGui::TextColored(ctx->cfg->error_color, + "0x%08" PRIx64 ": Max batch buffer jumps exceeded", batch_addr); + return; + } + + ctx->n_batch_buffer_start++; + for (p = batch; p < end; p += length) { inst = gen_spec_find_instruction(ctx->spec, ctx->engine, p); length = gen_group_get_length(inst, p); @@ -991,4 +999,6 @@ aub_viewer_render_batch(struct aub_viewer_decode_ctx *ctx, break; } } + + ctx->n_batch_buffer_start--; } |