summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_debug.c
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <[email protected]>2017-03-17 01:25:00 +0100
committerBas Nieuwenhuizen <[email protected]>2017-08-29 23:05:59 +0200
commit46dd30d08f4c788449f36fce9a53424008693cd0 (patch)
tree7d39b072776fe915f9111f8314aa519dd50b6a15 /src/gallium/drivers/radeonsi/si_debug.c
parent43eb761cad8a7941788735d2d7a5f10a36a25148 (diff)
ac/debug: Support multiple trace ids for nested IBs.
Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_debug.c')
-rw-r--r--src/gallium/drivers/radeonsi/si_debug.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/gallium/drivers/radeonsi/si_debug.c b/src/gallium/drivers/radeonsi/si_debug.c
index c2242a6deab..1b97ea40970 100644
--- a/src/gallium/drivers/radeonsi/si_debug.c
+++ b/src/gallium/drivers/radeonsi/si_debug.c
@@ -285,8 +285,8 @@ static void si_log_chunk_type_cs_destroy(void *data)
static void si_parse_current_ib(FILE *f, struct radeon_winsys_cs *cs,
unsigned begin, unsigned end,
- unsigned last_trace_id, const char *name,
- enum chip_class chip_class)
+ int *last_trace_id, unsigned trace_id_count,
+ const char *name, enum chip_class chip_class)
{
unsigned orig_end = end;
@@ -301,7 +301,8 @@ static void si_parse_current_ib(FILE *f, struct radeon_winsys_cs *cs,
if (begin < chunk->cdw) {
ac_parse_ib_chunk(f, chunk->buf + begin,
MIN2(end, chunk->cdw) - begin,
- last_trace_id, chip_class, NULL, NULL);
+ last_trace_id, trace_id_count,
+ chip_class, NULL, NULL);
}
if (end <= chunk->cdw)
@@ -318,7 +319,7 @@ static void si_parse_current_ib(FILE *f, struct radeon_winsys_cs *cs,
assert(end <= cs->current.cdw);
ac_parse_ib_chunk(f, cs->current.buf + begin, end - begin, last_trace_id,
- chip_class, NULL, NULL);
+ trace_id_count, chip_class, NULL, NULL);
fprintf(f, "------------------- %s end (dw = %u) -------------------\n\n",
name, orig_end);
@@ -346,25 +347,25 @@ static void si_log_chunk_type_cs_print(void *data, FILE *f)
if (chunk->gfx_begin == 0) {
if (ctx->init_config)
ac_parse_ib(f, ctx->init_config->pm4, ctx->init_config->ndw,
- -1, "IB2: Init config", ctx->b.chip_class,
+ NULL, 0, "IB2: Init config", ctx->b.chip_class,
NULL, NULL);
if (ctx->init_config_gs_rings)
ac_parse_ib(f, ctx->init_config_gs_rings->pm4,
ctx->init_config_gs_rings->ndw,
- -1, "IB2: Init GS rings", ctx->b.chip_class,
+ NULL, 0, "IB2: Init GS rings", ctx->b.chip_class,
NULL, NULL);
}
if (scs->flushed) {
ac_parse_ib(f, scs->gfx.ib + chunk->gfx_begin,
chunk->gfx_end - chunk->gfx_begin,
- last_trace_id, "IB", ctx->b.chip_class,
+ &last_trace_id, map ? 1 : 0, "IB", ctx->b.chip_class,
NULL, NULL);
} else {
si_parse_current_ib(f, ctx->b.gfx.cs, chunk->gfx_begin,
- chunk->gfx_end, last_trace_id, "IB",
- ctx->b.chip_class);
+ chunk->gfx_end, &last_trace_id, map ? 1 : 0,
+ "IB", ctx->b.chip_class);
}
}