Revert "i965: Move brw_emit_query_begin() to the render ring prelude."
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 27 Nov 2013 00:32:14 +0000 (16:32 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 4 Dec 2013 00:24:53 +0000 (16:24 -0800)
This reverts commit a4bf7f6b6e612626c4e4fc21507ac213a7ba4b00.
It breaks occlusion queries on Gen4-5.  Doing this right will likely
require larger changes, which should be done at a future date.

Some Piglit tests still passed due to other bugs; fixing those revealed
this problem.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/brw_draw_upload.c
src/mesa/drivers/dri/i965/intel_batchbuffer.c

index 89404b09e6132a41ee3509663231285a8f4e310b..57b81df81108dc1e592430026f12c22b2504f3ba 100644 (file)
@@ -614,6 +614,8 @@ static void brw_emit_vertices(struct brw_context *brw)
 
    brw_prepare_vertices(brw);
 
+   brw_emit_query_begin(brw);
+
    nr_elements = brw->vb.nr_enabled + brw->vs.prog_data->uses_vertexid;
 
    /* If the VS doesn't read any inputs (calculating vertex position from
index 25aacd95b9dc8f28445e0aff24eebca9fc6d348f..6b25c0261dc17b34227e106fd7deb45aa74be7ca 100644 (file)
@@ -182,13 +182,7 @@ do_batch_dump(struct brw_context *brw)
 void
 intel_batchbuffer_emit_render_ring_prelude(struct brw_context *brw)
 {
-   /* Without hardware contexts, we need to capture the pipeline statistics
-    * registers at the start and end of each render ring batch, so we can see
-    * what that batch contributed.  Emit state packets to write them to a BO.
-    */
-   brw_emit_query_begin(brw);
-
-   /* We may also need to enable and snapshot OA counters. */
+   /* We may need to enable and snapshot OA counters. */
    brw_perf_monitor_new_batch(brw);
 }