{
struct i915_context *i915 = i915_context(pipe);
- draw_flush(i915->draw);
-
- if (i915->batch->map == i915->batch->ptr) {
+ /* Only shortcut this if we have no fence, otherwise we must flush the
+ * empty batchbuffer to get our fence back.
+ */
+ if (!fence && i915->batch && (i915->batch->map == i915->batch->ptr)) {
return;
}
i915->hardware_dirty = ~0;
i915->immediate_dirty = ~0;
i915->dynamic_dirty = ~0;
+ i915->static_dirty = ~0;
/* kernel emits flushes in between batchbuffers */
i915->flush_dirty = 0;
+ i915->fired_vertices += i915->queued_vertices;
+ i915->queued_vertices = 0;
}