struct drm_i915_irq_emit ie;
int ret, seq = 1;
- if (bufmgr_fake->fence_emit != NULL)
- return bufmgr_fake->fence_emit(bufmgr_fake->fence_priv);
+ if (bufmgr_fake->fence_emit != NULL) {
+ seq = bufmgr_fake->fence_emit(bufmgr_fake->fence_priv);
+ return seq;
+ }
ie.irq_seq = &seq;
ret = drmCommandWriteRead(bufmgr_fake->fd, DRM_I915_IRQ_EMIT,
}
DBG("emit 0x%08x\n", seq);
- bufmgr_fake->last_fence = seq;
- return bufmgr_fake->last_fence;
+ return seq;
}
static void
if (bufmgr_fake->fence_wait != NULL) {
bufmgr_fake->fence_wait(seq, bufmgr_fake->fence_priv);
+ clear_fenced(bufmgr_fake, seq);
return;
}
struct block *block, *tmp;
int ret = 0;
+ bufmgr_fake->last_fence = fence_cookie;
DRMLISTFOREACHSAFE(block, tmp, &bufmgr_fake->fenced) {
assert(block->fenced);