+
+ if (unlikely(brw->always_flush_batch))
+ intel_batchbuffer_flush(brw);
+
+ /* We've smashed all state compared to what the normal 3D pipeline
+ * rendering tracks for GL.
+ */
+ brw->state.dirty.brw = ~0;
+ brw->state.dirty.cache = ~0;
+ brw->state_batch_count = 0;
+ brw->batch.need_workaround_flush = true;
+ brw->ib.type = -1;
+ intel_batchbuffer_clear_cache(brw);
+
+ /* Flush the sampler cache so any texturing from the destination is
+ * coherent.
+ */
+ intel_batchbuffer_emit_mi_flush(brw);