free(hq);
}
-static boolean
+static bool
fd_hw_begin_query(struct fd_context *ctx, struct fd_query *q)
{
struct fd_batch *batch = fd_context_batch(ctx);
resume_query(batch, hq, batch->draw);
/* add to active list: */
- assert(list_empty(&hq->list));
+ assert(list_is_empty(&hq->list));
list_addtail(&hq->list, &ctx->hw_active_queries);
return true;
return ((char *)ptr) + (samp->tile_stride * n) + samp->offset;
}
-static boolean
+static bool
fd_hw_get_query_result(struct fd_context *ctx, struct fd_query *q,
- boolean wait, union pipe_query_result *result)
+ bool wait, union pipe_query_result *result)
{
struct fd_hw_query *hq = fd_hw_query(q);
const struct fd_hw_sample_provider *p = hq->provider;
DBG("%p: wait=%d, active=%d", q, wait, q->active);
- if (LIST_IS_EMPTY(&hq->periods))
+ if (list_is_empty(&hq->periods))
return true;
- assert(LIST_IS_EMPTY(&hq->list));
+ assert(list_is_empty(&hq->list));
assert(!hq->period);
/* if !wait, then check the last sample (the one most likely to
};
struct fd_query *
-fd_hw_create_query(struct fd_context *ctx, unsigned query_type)
+fd_hw_create_query(struct fd_context *ctx, unsigned query_type, unsigned index)
{
struct fd_hw_query *hq;
struct fd_query *q;
q = &hq->base;
q->funcs = &hw_query_funcs;
q->type = query_type;
+ q->index = index;
return q;
}