summaryrefslogtreecommitdiff
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-11-07 17:16:47 -0700
committerBrian <brian.paul@tungstengraphics.com>2007-11-07 17:16:47 -0700
commit3fe055ec9218a8745d9a53f75f4abd4760fcce28 (patch)
tree3418e9b0ae67dbdd85a4e00783aec5f3785c4bd5 /src/mesa/drivers
parentae44a81d1bd40852a7cea9b8025dfa3821adc785 (diff)
Remove winsys->wait_idle(), subsumed by pipe->flush().
Connect intel_i915_batch_finish() into i915_winsys, just like intel_i915_batch_flush(). Call i915_winsys->batch_finish() in response to pipe->flush(PIPE_FLUSH_WAIT). Now all the batchbuffer/fence code is in one place and a little cleaner.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/intel_winsys/intel_winsys_i915.c8
-rw-r--r--src/mesa/drivers/dri/intel_winsys/intel_winsys_pipe.c15
2 files changed, 8 insertions, 15 deletions
diff --git a/src/mesa/drivers/dri/intel_winsys/intel_winsys_i915.c b/src/mesa/drivers/dri/intel_winsys/intel_winsys_i915.c
index d6ba6024b2..8e0eea4392 100644
--- a/src/mesa/drivers/dri/intel_winsys/intel_winsys_i915.c
+++ b/src/mesa/drivers/dri/intel_winsys/intel_winsys_i915.c
@@ -120,6 +120,13 @@ static void intel_i915_batch_flush( struct i915_winsys *sws )
}
+static void intel_i915_batch_finish( struct i915_winsys *sws )
+{
+ struct intel_context *intel = intel_i915_winsys(sws)->intel;
+ intel_batchbuffer_finish( intel->batch );
+}
+
+
/**
* Create i915 hardware rendering context.
*/
@@ -136,6 +143,7 @@ intel_create_i915simple( struct intel_context *intel,
iws->winsys.batch_dword = intel_i915_batch_dword;
iws->winsys.batch_reloc = intel_i915_batch_reloc;
iws->winsys.batch_flush = intel_i915_batch_flush;
+ iws->winsys.batch_finish = intel_i915_batch_finish;
iws->intel = intel;
/* Create the i915simple context:
diff --git a/src/mesa/drivers/dri/intel_winsys/intel_winsys_pipe.c b/src/mesa/drivers/dri/intel_winsys/intel_winsys_pipe.c
index 16fff77af4..ae02f98a78 100644
--- a/src/mesa/drivers/dri/intel_winsys/intel_winsys_pipe.c
+++ b/src/mesa/drivers/dri/intel_winsys/intel_winsys_pipe.c
@@ -157,20 +157,6 @@ intel_user_buffer_create(struct pipe_winsys *winsys, void *ptr, unsigned bytes)
}
-static void
-intel_wait_idle( struct pipe_winsys *winsys, void *context_private )
-{
- struct intel_context *intel = (struct intel_context *) context_private;
-
- if (intel->batch->last_fence) {
- driFenceFinish(intel->batch->last_fence,
- DRM_FENCE_TYPE_EXE | DRM_I915_FENCE_TYPE_RW, GL_FALSE);
- driFenceUnReference(intel->batch->last_fence);
- intel->batch->last_fence = NULL;
- }
-}
-
-
/* The state tracker (should!) keep track of whether the fake
* frontbuffer has been touched by any rendering since the last time
* we copied its contents to the real frontbuffer. Our task is easy:
@@ -311,7 +297,6 @@ intel_create_pipe_winsys( int fd )
iws->winsys.buffer_subdata = intel_buffer_subdata;
iws->winsys.buffer_get_subdata = intel_buffer_get_subdata;
iws->winsys.flush_frontbuffer = intel_flush_frontbuffer;
- iws->winsys.wait_idle = intel_wait_idle;
iws->winsys.printf = intel_printf;
iws->winsys.get_name = intel_get_name;
iws->winsys.region_alloc = intel_i915_region_alloc;