*/
static struct pipe_query *
-fd_create_query(struct pipe_context *pctx, unsigned query_type)
+fd_create_query(struct pipe_context *pctx, unsigned query_type, unsigned index)
{
struct fd_context *ctx = fd_context(pctx);
struct fd_query *q;
q->funcs->destroy_query(fd_context(pctx), q);
}
-static void
+static boolean
fd_begin_query(struct pipe_context *pctx, struct pipe_query *pq)
{
struct fd_query *q = fd_query(pq);
- q->funcs->begin_query(fd_context(pctx), q);
+ return q->funcs->begin_query(fd_context(pctx), q);
}
static void
return q->funcs->get_query_result(fd_context(pctx), q, wait, result);
}
+static void
+fd_render_condition(struct pipe_context *pctx, struct pipe_query *pq,
+ boolean condition, uint mode)
+{
+ struct fd_context *ctx = fd_context(pctx);
+ ctx->cond_query = pq;
+ ctx->cond_cond = condition;
+ ctx->cond_mode = mode;
+}
+
static int
fd_get_driver_query_info(struct pipe_screen *pscreen,
unsigned index, struct pipe_driver_query_info *info)
{
struct pipe_driver_query_info list[] = {
- {"draw-calls", FD_QUERY_DRAW_CALLS, 0},
- {"batches", FD_QUERY_BATCH_TOTAL, 0},
- {"batches-sysmem", FD_QUERY_BATCH_SYSMEM, 0},
- {"batches-gmem", FD_QUERY_BATCH_GMEM, 0},
- {"restores", FD_QUERY_BATCH_RESTORE, 0},
- {"prims-emitted", PIPE_QUERY_PRIMITIVES_EMITTED, 0},
+ {"draw-calls", FD_QUERY_DRAW_CALLS, {0}},
+ {"batches", FD_QUERY_BATCH_TOTAL, {0}},
+ {"batches-sysmem", FD_QUERY_BATCH_SYSMEM, {0}},
+ {"batches-gmem", FD_QUERY_BATCH_GMEM, {0}},
+ {"restores", FD_QUERY_BATCH_RESTORE, {0}},
+ {"prims-emitted", PIPE_QUERY_PRIMITIVES_EMITTED, {0}},
};
if (!info)
pctx->begin_query = fd_begin_query;
pctx->end_query = fd_end_query;
pctx->get_query_result = fd_get_query_result;
+ pctx->render_condition = fd_render_condition;
}