r300g: fix BO space accounting for occlusion queries
[mesa.git] / src / gallium / drivers / r300 / r300_flush.c
index 0d8158e19904b8bf2cb0619cbd466a65bbffa775..ad7cae7bf53c4c95048dfb77fbd94c7f3590b0e8 100644 (file)
@@ -48,11 +48,10 @@ static void r300_flush(struct pipe_context* pipe,
         draw_flush(r300->draw);
     }
 
-    r300_emit_query_end(r300);
-
     if (r300->dirty_hw) {
+        r300_emit_query_end(r300);
+
         FLUSH_CS;
-        r300->dirty_state = R300_NEW_KITCHEN_SINK;
         r300->dirty_hw = 0;
 
         /* New kitchen sink, baby. */
@@ -75,7 +74,6 @@ static void r300_flush(struct pipe_context* pipe,
     }
 }
 
-
 void r300_init_flush_functions(struct r300_context* r300)
 {
     r300->context.flush = r300_flush;