st->flush(st, flush_flags, &new_fence);
/* throttle on the previous fence */
- if (drawable->throttle_fence)
+ if (drawable->throttle_fence) {
screen->fence_finish(screen, NULL, drawable->throttle_fence, PIPE_TIMEOUT_INFINITE);
- screen->fence_reference(screen, &drawable->throttle_fence, new_fence);
+ screen->fence_reference(screen, &drawable->throttle_fence, NULL);
+ }
+ drawable->throttle_fence = new_fence;
}
else if (flags & (__DRI2_FLUSH_DRAWABLE | __DRI2_FLUSH_CONTEXT)) {
st->flush(st, flush_flags, NULL);