failover: queiten compiler warnings
[mesa.git] / src / gallium / drivers / i915simple / i915_flush.c
index 96a54281f11f871f959318f118257b9e437f857c..472e0ab7740b7f6f6e75fb12d41397407548d9e0 100644 (file)
 #include "i915_batch.h"
 
 
-/**
- * In future we may want a fence-like interface instead of finish.
- */
 static void i915_flush( struct pipe_context *pipe,
-                       unsigned flags )
+                        unsigned flags,
+                        struct pipe_fence_handle **fence )
 {
    struct i915_context *i915 = i915_context(pipe);
 
@@ -60,20 +58,16 @@ static void i915_flush( struct pipe_context *pipe,
         flush |= FLUSH_MAP_CACHE;
 
       if (!BEGIN_BATCH(1, 0)) {
-        FLUSH_BATCH();
+        FLUSH_BATCH(NULL);
         assert(BEGIN_BATCH(1, 0));
       }
       OUT_BATCH( flush );
-      ADVANCE_BATCH();
    }
 
    /* If there are no flags, just flush pending commands to hardware:
     */
-   FLUSH_BATCH();
-
-   if (flags & PIPE_FLUSH_WAIT) {
-      i915->winsys->batch_finish(i915->winsys);
-   }
+   FLUSH_BATCH(fence);
+   i915->vbo_flushed = 1;
 }