aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_queryobj.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2012-10-17 17:48:05 -0700
committerEric Anholt <[email protected]>2012-10-26 12:41:54 -0700
commit459b28aba7c4ef0afe8d23dd2953e236d1bf7aed (patch)
treedef5a58910a72557adea2149651fa00b163299db /src/mesa/drivers/dri/i965/brw_queryobj.c
parent99dc87061333eeb8f617a6919cc3b6e9cc85beee (diff)
i965: Merge brw_prepare_query_begin() and brw_emit_query_begin().
This is a leftover from when we had to split those two functions due to the separate BO validation step. Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_queryobj.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_queryobj.c23
1 files changed, 6 insertions, 17 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_queryobj.c b/src/mesa/drivers/dri/i965/brw_queryobj.c
index 0e42f39abea..ff873aea9df 100644
--- a/src/mesa/drivers/dri/i965/brw_queryobj.c
+++ b/src/mesa/drivers/dri/i965/brw_queryobj.c
@@ -392,14 +392,16 @@ static void brw_check_query(struct gl_context *ctx, struct gl_query_object *q)
}
}
-/** Called to set up the query BO and account for its aperture space */
+/** Called just before primitive drawing to get a beginning PS_DEPTH_COUNT. */
void
-brw_prepare_query_begin(struct brw_context *brw)
+brw_emit_query_begin(struct brw_context *brw)
{
struct intel_context *intel = &brw->intel;
+ struct gl_context *ctx = &intel->ctx;
+ struct brw_query_object *query = brw->query.obj;
- /* Skip if we're not doing any queries. */
- if (!brw->query.obj)
+ /* Skip if we're not doing any queries, or we've emitted the start. */
+ if (!query || brw->query.begin_emitted)
return;
/* Get a new query BO if we're going to need it. */
@@ -417,19 +419,6 @@ brw_prepare_query_begin(struct brw_context *brw)
brw->query.index = 0;
}
-}
-
-/** Called just before primitive drawing to get a beginning PS_DEPTH_COUNT. */
-void
-brw_emit_query_begin(struct brw_context *brw)
-{
- struct intel_context *intel = &brw->intel;
- struct gl_context *ctx = &intel->ctx;
- struct brw_query_object *query = brw->query.obj;
-
- /* Skip if we're not doing any queries, or we've emitted the start. */
- if (!query || brw->query.begin_emitted)
- return;
write_depth_count(intel, brw->query.bo, brw->query.index * 2);