If we fail to track rendering using ShmCompletionEvents and begin to
drop frames, insert an explicit XSync.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
while (XPending(c->dst.dpy))
;
- if (c->dst.serial > LastKnownRequestProcessed(c->dst.dpy))
- return EAGAIN;
+ if (c->dst.serial > LastKnownRequestProcessed(c->dst.dpy)) {
+ if (c->dst.display->send++ == 0)
+ return EAGAIN;
+
+ XSync(c->dst.dpy, False);
+ c->dst.display->flush = 0;
+ c->dst.display->send = 0;
+ }
}
if (FORCE_FULL_REDRAW) {