i915g: Improve flushing using heuristics.
[mesa.git] / src / gallium / drivers / i915 / i915_clear.c
index fcb208d6dae2f4cf9c7e68bb301c14e78b30e587..e1d6a749cdc8cf6038029070b94f22e20f48f93c 100644 (file)
@@ -120,6 +120,11 @@ i915_clear_emit(struct pipe_context *pipe, unsigned buffers, const float *rgba,
    OUT_BATCH_F(desty + height);
    OUT_BATCH_F(destx);
    OUT_BATCH_F(desty);
+
+   /* Flush after clear, its expected to be a costly operation.
+    * This is not required, just a heuristic
+    */
+   FLUSH_BATCH(NULL);
 }
 
 /**