From: Daniel Vetter Date: Tue, 7 Jun 2011 20:22:16 +0000 (+0200) Subject: i915g: implement fence signalling X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=219150433a305b0e0b6093647758eed3a7650bc4;p=mesa.git i915g: implement fence signalling v2: Incorporated feedback from Jakob Bornecrantz. Signed-off-by: Daniel Vetter --- diff --git a/src/gallium/winsys/i915/drm/i915_drm_fence.c b/src/gallium/winsys/i915/drm/i915_drm_fence.c index 30ebf4835ea..650ccfcd876 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