summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/i915/i915_flush.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/i915/i915_flush.c')
-rw-r--r--src/gallium/drivers/i915/i915_flush.c27
1 files changed, 19 insertions, 8 deletions
diff --git a/src/gallium/drivers/i915/i915_flush.c b/src/gallium/drivers/i915/i915_flush.c
index 1582168eba5..a2c70b11991 100644
--- a/src/gallium/drivers/i915/i915_flush.c
+++ b/src/gallium/drivers/i915/i915_flush.c
@@ -35,11 +35,12 @@
#include "i915_context.h"
#include "i915_reg.h"
#include "i915_batch.h"
+#include "i915_debug.h"
-static void i915_flush( struct pipe_context *pipe,
- unsigned flags,
- struct pipe_fence_handle **fence )
+static void i915_flush_pipe( struct pipe_context *pipe,
+ unsigned flags,
+ struct pipe_fence_handle **fence )
{
struct i915_context *i915 = i915_context(pipe);
@@ -66,21 +67,31 @@ static void i915_flush( struct pipe_context *pipe,
}
#endif
-#if 0
if (i915->batch->map == i915->batch->ptr) {
return;
}
-#endif
/* If there are no flags, just flush pending commands to hardware:
*/
FLUSH_BATCH(fence);
i915->vbo_flushed = 1;
-}
-
+ I915_DBG(DBG_FLUSH, "%s: #####\n", __FUNCTION__);
+}
void i915_init_flush_functions( struct i915_context *i915 )
{
- i915->base.flush = i915_flush;
+ i915->base.flush = i915_flush_pipe;
+}
+
+/**
+ * Here we handle all the notifications that needs to go out on a flush.
+ * XXX might move above function to i915_pipe_flush.c and leave this here.
+ */
+void i915_flush(struct i915_context *i915, struct pipe_fence_handle **fence)
+{
+ struct i915_winsys_batchbuffer *batch = i915->batch;
+
+ batch->iws->batchbuffer_flush(batch, fence);
+ i915->hardware_dirty = ~0;
}