mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-25 11:20:49 +02:00
freedreno: rework accumulated query result vfunc
Take the query object, rather than the ctx. The ctx ptr isn't hugely useful but for back queries we will need the query object to properly get the results. Signed-off-by: Rob Clark <robdclark@gmail.com>
This commit is contained in:
parent
1f464d5301
commit
37b724ff72
3 changed files with 9 additions and 9 deletions
|
|
@ -111,7 +111,7 @@ occlusion_pause(struct fd_acc_query *aq, struct fd_batch *batch)
|
|||
}
|
||||
|
||||
static void
|
||||
occlusion_counter_result(struct fd_context *ctx, void *buf,
|
||||
occlusion_counter_result(struct fd_acc_query *aq, void *buf,
|
||||
union pipe_query_result *result)
|
||||
{
|
||||
struct fd5_query_sample *sp = buf;
|
||||
|
|
@ -119,7 +119,7 @@ occlusion_counter_result(struct fd_context *ctx, void *buf,
|
|||
}
|
||||
|
||||
static void
|
||||
occlusion_predicate_result(struct fd_context *ctx, void *buf,
|
||||
occlusion_predicate_result(struct fd_acc_query *aq, void *buf,
|
||||
union pipe_query_result *result)
|
||||
{
|
||||
struct fd5_query_sample *sp = buf;
|
||||
|
|
@ -196,7 +196,7 @@ timestamp_pause(struct fd_acc_query *aq, struct fd_batch *batch)
|
|||
}
|
||||
|
||||
static uint64_t
|
||||
ticks_to_ns(struct fd_context *ctx, uint32_t ts)
|
||||
ticks_to_ns(uint32_t ts)
|
||||
{
|
||||
/* This is based on the 19.2MHz always-on rbbm timer.
|
||||
*
|
||||
|
|
@ -206,19 +206,19 @@ ticks_to_ns(struct fd_context *ctx, uint32_t ts)
|
|||
}
|
||||
|
||||
static void
|
||||
time_elapsed_accumulate_result(struct fd_context *ctx, void *buf,
|
||||
time_elapsed_accumulate_result(struct fd_acc_query *aq, void *buf,
|
||||
union pipe_query_result *result)
|
||||
{
|
||||
struct fd5_query_sample *sp = buf;
|
||||
result->u64 = ticks_to_ns(ctx, sp->result);
|
||||
result->u64 = ticks_to_ns(sp->result);
|
||||
}
|
||||
|
||||
static void
|
||||
timestamp_accumulate_result(struct fd_context *ctx, void *buf,
|
||||
timestamp_accumulate_result(struct fd_acc_query *aq, void *buf,
|
||||
union pipe_query_result *result)
|
||||
{
|
||||
struct fd5_query_sample *sp = buf;
|
||||
result->u64 = ticks_to_ns(ctx, sp->result);
|
||||
result->u64 = ticks_to_ns(sp->result);
|
||||
}
|
||||
|
||||
static const struct fd_acc_sample_provider time_elapsed = {
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ fd_acc_get_query_result(struct fd_context *ctx, struct fd_query *q,
|
|||
fd_bo_cpu_prep(rsc->bo, ctx->pipe, DRM_FREEDRENO_PREP_READ);
|
||||
|
||||
void *ptr = fd_bo_map(rsc->bo);
|
||||
p->result(ctx, ptr, result);
|
||||
p->result(aq, ptr, result);
|
||||
fd_bo_cpu_fini(rsc->bo);
|
||||
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ struct fd_acc_sample_provider {
|
|||
void (*resume)(struct fd_acc_query *aq, struct fd_batch *batch);
|
||||
void (*pause)(struct fd_acc_query *aq, struct fd_batch *batch);
|
||||
|
||||
void (*result)(struct fd_context *ctx, void *buf,
|
||||
void (*result)(struct fd_acc_query *aq, void *buf,
|
||||
union pipe_query_result *result);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue