Mesa (master): i915g: implement fence signalling

Daniel Vetter danvet at kemper.freedesktop.org
Sat Jun 11 11:14:50 PDT 2011


Module: Mesa
Branch: master
Commit: 219150433a305b0e0b6093647758eed3a7650bc4
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=219150433a305b0e0b6093647758eed3a7650bc4

Author: Daniel Vetter <daniel.vetter at ffwll.ch>
Date:   Tue Jun  7 22:22:16 2011 +0200

i915g: implement fence signalling

v2: Incorporated feedback from Jakob Bornecrantz.

Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>

---

 src/gallium/winsys/i915/drm/i915_drm_fence.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/gallium/winsys/i915/drm/i915_drm_fence.c b/src/gallium/winsys/i915/drm/i915_drm_fence.c
index 30ebf48..650ccfc 100644
--- a/src/gallium/winsys/i915/drm/i915_drm_fence.c
+++ b/src/gallium/winsys/i915/drm/i915_drm_fence.c
@@ -52,9 +52,13 @@ static int
 i915_drm_fence_signalled(struct i915_winsys *iws,
                           struct pipe_fence_handle *fence)
 {
-   assert(0);
+   struct i915_drm_fence *f = (struct i915_drm_fence *)fence;
 
-   return 0;
+   /* fence already expired */
+   if (!f->bo)
+	   return 1;
+
+   return !drm_intel_bo_busy(f->bo);
 }
 
 static int



More information about the mesa-commit mailing list