svga: refactor occlusion query code
[mesa.git] / src / gallium / drivers / i915 / i915_prim_emit.c
index dd997e2cf482905cfeccc49eb9e978436e2078d2..4de5c9e898c49d30ecb4e41eaf3ed768c43e7d0a 100644 (file)
@@ -144,15 +144,14 @@ emit_prim( struct draw_stage *stage,
    vertex_size = i915->current.vertex_info.size * 4; /* in bytes */
    assert(vertex_size >= 12); /* never smaller than 12 bytes */
 
-   if (!BEGIN_BATCH( 1 + nr * vertex_size / 4, 0 )) {
-      FLUSH_BATCH(NULL);
+   if (!BEGIN_BATCH( 1 + nr * vertex_size / 4)) {
+      FLUSH_BATCH(NULL, I915_FLUSH_ASYNC);
 
       /* Make sure state is re-emitted after a flush: 
        */
-      i915_update_derived( i915 );
       i915_emit_hardware_state( i915 );
 
-      if (!BEGIN_BATCH( 1 + nr * vertex_size / 4, 0 )) {
+      if (!BEGIN_BATCH( 1 + nr * vertex_size / 4)) {
         assert(0);
         return;
       }