aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_query.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-12-21 16:29:19 +0100
committerMarek Olšák <[email protected]>2012-12-21 23:42:04 +0100
commitfb45a816eb9de88b2862c51ca107676b9eaade8d (patch)
tree61024a595b624777dd4422a5865b26e6e11c83e0 /src/gallium/drivers/r600/r600_query.c
parent6d49ffde11ddb4a9391172a6e9a4e3ad3eb87ded (diff)
r600g: don't suspend TIME_ELAPSED queries during flushing
According to the GL spec, the result should be equivalent to comparing two timestamps.
Diffstat (limited to 'src/gallium/drivers/r600/r600_query.c')
-rw-r--r--src/gallium/drivers/r600/r600_query.c36
1 files changed, 4 insertions, 32 deletions
diff --git a/src/gallium/drivers/r600/r600_query.c b/src/gallium/drivers/r600/r600_query.c
index d35d3fbd0bd..083d510677a 100644
--- a/src/gallium/drivers/r600/r600_query.c
+++ b/src/gallium/drivers/r600/r600_query.c
@@ -156,9 +156,7 @@ static void r600_emit_query_begin(struct r600_context *ctx, struct r600_query *q
cs->buf[cs->cdw++] = PKT3(PKT3_NOP, 0, 0);
cs->buf[cs->cdw++] = r600_context_bo_reloc(ctx, query->buffer.buf, RADEON_USAGE_WRITE);
- if (r600_is_timer_query(query->type)) {
- ctx->num_cs_dw_timer_queries_suspend += query->num_cs_dw;
- } else {
+ if (!r600_is_timer_query(query->type)) {
ctx->num_cs_dw_nontimer_queries_suspend += query->num_cs_dw;
}
}
@@ -213,9 +211,7 @@ static void r600_emit_query_end(struct r600_context *ctx, struct r600_query *que
query->buffer.results_end += query->result_size;
if (r600_query_needs_begin(query->type)) {
- if (r600_is_timer_query(query->type)) {
- ctx->num_cs_dw_timer_queries_suspend -= query->num_cs_dw;
- } else {
+ if (!r600_is_timer_query(query->type)) {
ctx->num_cs_dw_nontimer_queries_suspend -= query->num_cs_dw;
}
}
@@ -366,9 +362,7 @@ static void r600_begin_query(struct pipe_context *ctx, struct pipe_query *query)
r600_emit_query_begin(rctx, rquery);
- if (r600_is_timer_query(rquery->type)) {
- LIST_ADDTAIL(&rquery->list, &rctx->active_timer_queries);
- } else {
+ if (!r600_is_timer_query(rquery->type)) {
LIST_ADDTAIL(&rquery->list, &rctx->active_nontimer_queries);
}
}
@@ -380,7 +374,7 @@ static void r600_end_query(struct pipe_context *ctx, struct pipe_query *query)
r600_emit_query_end(rctx, rquery);
- if (r600_query_needs_begin(rquery->type)) {
+ if (r600_query_needs_begin(rquery->type) && !r600_is_timer_query(rquery->type)) {
LIST_DELINIT(&rquery->list);
}
}
@@ -581,28 +575,6 @@ void r600_resume_nontimer_queries(struct r600_context *ctx)
}
}
-void r600_suspend_timer_queries(struct r600_context *ctx)
-{
- struct r600_query *query;
-
- LIST_FOR_EACH_ENTRY(query, &ctx->active_timer_queries, list) {
- r600_emit_query_end(ctx, query);
- }
-
- assert(ctx->num_cs_dw_timer_queries_suspend == 0);
-}
-
-void r600_resume_timer_queries(struct r600_context *ctx)
-{
- struct r600_query *query;
-
- assert(ctx->num_cs_dw_timer_queries_suspend == 0);
-
- LIST_FOR_EACH_ENTRY(query, &ctx->active_timer_queries, list) {
- r600_emit_query_begin(ctx, query);
- }
-}
-
void r600_init_query_functions(struct r600_context *rctx)
{
rctx->context.create_query = r600_create_query;