summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-11-08 12:54:01 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2013-11-08 12:56:06 +0000
commit969b064f74e0058a49afa17287184005d1e11402 (patch)
tree7ab6a770504dfb8ee840a66ea5120f501db4fcf1 /tools
parente0075ccee2e7bbe46ecbf717817d468cc9248cc4 (diff)
intel-virtual-output: Perform an explicit sync
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>
Diffstat (limited to 'tools')
-rw-r--r--tools/virtual.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/virtual.c b/tools/virtual.c
index 71d18f5a..74a03e81 100644
--- a/tools/virtual.c
+++ b/tools/virtual.c
@@ -1359,8 +1359,14 @@ static int clone_paint(struct clone *c)
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) {