freedreno: Remove always-true return from per-gen begin_query.

You should do failure-prone allocation in create_query, not begin, anyway.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4356>
This commit is contained in:
Eric Anholt 2020-03-27 16:46:22 -07:00 committed by Marge Bot
parent 1ef9658906
commit b7fe793869
5 changed files with 7 additions and 13 deletions

View file

@ -62,15 +62,14 @@ static bool
fd_begin_query(struct pipe_context *pctx, struct pipe_query *pq)
{
struct fd_query *q = fd_query(pq);
bool ret;
if (q->active)
return false;
ret = q->funcs->begin_query(fd_context(pctx), q);
q->active = ret;
q->funcs->begin_query(fd_context(pctx), q);
q->active = true;
return ret;
return true;
}
static bool

View file

@ -35,7 +35,7 @@ struct fd_query;
struct fd_query_funcs {
void (*destroy_query)(struct fd_context *ctx,
struct fd_query *q);
bool (*begin_query)(struct fd_context *ctx, struct fd_query *q);
void (*begin_query)(struct fd_context *ctx, struct fd_query *q);
void (*end_query)(struct fd_context *ctx, struct fd_query *q);
bool (*get_query_result)(struct fd_context *ctx,
struct fd_query *q, bool wait,

View file

@ -74,7 +74,7 @@ realloc_query_bo(struct fd_context *ctx, struct fd_acc_query *aq)
fd_bo_cpu_fini(rsc->bo);
}
static bool
static void
fd_acc_begin_query(struct fd_context *ctx, struct fd_query *q)
{
struct fd_batch *batch = fd_context_batch(ctx);
@ -93,8 +93,6 @@ fd_acc_begin_query(struct fd_context *ctx, struct fd_query *q)
/* add to active list: */
assert(list_is_empty(&aq->node));
list_addtail(&aq->node, &ctx->acc_active_queries);
return true;
}
static void

View file

@ -132,7 +132,7 @@ fd_hw_destroy_query(struct fd_context *ctx, struct fd_query *q)
free(hq);
}
static bool
static void
fd_hw_begin_query(struct fd_context *ctx, struct fd_query *q)
{
struct fd_batch *batch = fd_context_batch(ctx);
@ -149,8 +149,6 @@ fd_hw_begin_query(struct fd_context *ctx, struct fd_query *q)
/* add to active list: */
assert(list_is_empty(&hq->list));
list_addtail(&hq->list, &ctx->hw_active_queries);
return true;
}
static void

View file

@ -108,7 +108,7 @@ is_draw_rate_query(struct fd_query *q)
}
}
static bool
static void
fd_sw_begin_query(struct fd_context *ctx, struct fd_query *q)
{
struct fd_sw_query *sq = fd_sw_query(q);
@ -118,7 +118,6 @@ fd_sw_begin_query(struct fd_context *ctx, struct fd_query *q)
} else if (is_draw_rate_query(q)) {
sq->begin_time = ctx->stats.draw_calls;
}
return true;
}
static void