struct etna_acc_sample_provider {
bool (*supports)(unsigned query_type);
+ struct etna_acc_query * (*allocate)(struct etna_context *ctx, unsigned query_type);
void (*resume)(struct etna_acc_query *aq, struct etna_context *ctx);
void (*suspend)(struct etna_acc_query *aq, struct etna_context *ctx);
- void (*result)(struct etna_acc_query *aq, void *buf,
- union pipe_query_result *result);
+ bool (*result)(struct etna_acc_query *aq, void *buf,
+ union pipe_query_result *result);
};
struct etna_acc_query {
{
const struct etna_acc_sample_provider *p = aq->provider;
- if (!aq->base.active)
- return;
-
p->suspend(aq, ctx);
aq->samples++;
}
{
const struct etna_acc_sample_provider *p = aq->provider;
- if (!aq->base.active)
- return;
-
p->resume(aq, ctx);
aq->samples++;
}