diff options
author | Rob Clark <[email protected]> | 2016-07-20 14:50:14 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2016-07-30 09:23:42 -0400 |
commit | 4175606474acda62775c41fa95a577e0796ff17f (patch) | |
tree | 7bd22754a8d896798c5918f5e51c2432254dae36 | |
parent | e684c32d2fdda204b79661ecf26881eae133d64a (diff) |
freedreno: add some hw query traces
Signed-off-by: Rob Clark <[email protected]>
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_query_hw.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_query_hw.c b/src/gallium/drivers/freedreno/freedreno_query_hw.c index 481c66d3925..e5ef51a0b98 100644 --- a/src/gallium/drivers/freedreno/freedreno_query_hw.c +++ b/src/gallium/drivers/freedreno/freedreno_query_hw.c @@ -104,6 +104,7 @@ resume_query(struct fd_batch *batch, struct fd_hw_query *hq, struct fd_ringbuffer *ring) { int idx = pidx(hq->provider->query_type); + DBG("%p", hq); assert(idx >= 0); /* query never would have been created otherwise */ assert(!hq->period); batch->active_providers |= (1 << idx); @@ -119,6 +120,7 @@ pause_query(struct fd_batch *batch, struct fd_hw_query *hq, struct fd_ringbuffer *ring) { int idx = pidx(hq->provider->query_type); + DBG("%p", hq); assert(idx >= 0); /* query never would have been created otherwise */ assert(hq->period && !hq->period->end); assert(batch->active_providers & (1 << idx)); @@ -144,6 +146,8 @@ fd_hw_destroy_query(struct fd_context *ctx, struct fd_query *q) { struct fd_hw_query *hq = fd_hw_query(q); + DBG("%p: active=%d", q, q->active); + destroy_periods(ctx, hq); list_del(&hq->list); @@ -156,6 +160,8 @@ fd_hw_begin_query(struct fd_context *ctx, struct fd_query *q) struct fd_batch *batch = ctx->batch; struct fd_hw_query *hq = fd_hw_query(q); + DBG("%p: active=%d", q, q->active); + if (q->active) return false; @@ -179,16 +185,22 @@ fd_hw_end_query(struct fd_context *ctx, struct fd_query *q) { struct fd_batch *batch = ctx->batch; struct fd_hw_query *hq = fd_hw_query(q); + /* there are a couple special cases, which don't have * a matching ->begin_query(): */ if (skip_begin_query(q->type) && !q->active) { fd_hw_begin_query(ctx, q); } + + DBG("%p: active=%d", q, q->active); + if (!q->active) return; + if (batch && is_active(hq, batch->stage)) pause_query(batch, hq, batch->draw); + q->active = false; /* remove from active list: */ list_delinit(&hq->list); @@ -208,6 +220,8 @@ fd_hw_get_query_result(struct fd_context *ctx, struct fd_query *q, const struct fd_hw_sample_provider *p = hq->provider; struct fd_hw_sample_period *period; + DBG("%p: wait=%d, active=%d", q, wait, q->active); + if (q->active) return false; @@ -308,6 +322,8 @@ fd_hw_create_query(struct fd_context *ctx, unsigned query_type) if (!hq) return NULL; + DBG("%p: query_type=%u", hq, query_type); + hq->provider = ctx->sample_providers[idx]; list_inithead(&hq->periods); |