summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_query.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2011-10-28 18:27:00 +0200
committerMarek Olšák <[email protected]>2011-10-28 19:29:05 +0200
commite9b6f21a5054b2639a1dfc6401e4e9053dce5394 (patch)
treecff3171b99578309123c17fc0bdd40eac39931cc /src/gallium/drivers/r600/r600_query.c
parentb70a51318a43f489611f4fc2f93887a362f5c99f (diff)
r600g: only maintain the list of active queries
And not all existing queries. The only reason we have that list is to be able to suspend and resume the active ones. This reduces looping over queries when suspending and resuming. The queries no longer have to track some of their states.
Diffstat (limited to 'src/gallium/drivers/r600/r600_query.c')
-rw-r--r--src/gallium/drivers/r600/r600_query.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/r600/r600_query.c b/src/gallium/drivers/r600/r600_query.c
index e3512f7b1a6..a632ef4615b 100644
--- a/src/gallium/drivers/r600/r600_query.c
+++ b/src/gallium/drivers/r600/r600_query.c
@@ -45,13 +45,16 @@ static void r600_begin_query(struct pipe_context *ctx, struct pipe_query *query)
rquery->result = 0;
rquery->results_start = rquery->results_end;
r600_query_begin(&rctx->ctx, (struct r600_query *)query);
+ LIST_ADDTAIL(&rquery->list, &rctx->ctx.active_query_list);
}
static void r600_end_query(struct pipe_context *ctx, struct pipe_query *query)
{
struct r600_pipe_context *rctx = (struct r600_pipe_context *)ctx;
+ struct r600_query *rquery = (struct r600_query *)query;
- r600_query_end(&rctx->ctx, (struct r600_query *)query);
+ r600_query_end(&rctx->ctx, rquery);
+ LIST_DELINIT(&rquery->list);
}
static boolean r600_get_query_result(struct pipe_context *ctx,