From 51f184edfb2c09ea512c45cfe468a68406a8f6da Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 12 Feb 2015 12:49:57 +0000 Subject: test/present: Tighten the accuracy requirements Signed-off-by: Chris Wilson --- test/present-test.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'test') diff --git a/test/present-test.c b/test/present-test.c index bd38977c..3c843599 100644 --- a/test/present-test.c +++ b/test/present-test.c @@ -351,15 +351,18 @@ static int test_future(Display *dpy, void *Q) } else { int msc = (uint32_t)ce->msc - ce->serial; if (msc < 0) { - fprintf(stderr, "\tframe %d displayed early by %lld frames\n", (int)(ce->serial - target - 60)/(15*60), (long long)msc); ret += -msc; - if (-msc > earliest) + if (-msc > earliest) { + fprintf(stderr, "\tframe %d displayed early by %lld frames\n", (int)(ce->serial - target - 60)/(15*60), (long long)msc); earliest = -msc; + } early++; - } else if (msc > 1) { /* allow the frame to slip by a vblank */ + } else if (msc > 0) { ret += msc; - if (msc > latest) + if (msc > latest) { + fprintf(stderr, "\tframe %d displayed late by %lld frames\n", (int)(ce->serial - target - 60), (long long)msc); latest = msc; + } late++; } } @@ -609,15 +612,18 @@ static int test_accuracy(Display *dpy, void *Q) msc = (uint32_t)ce->msc - ce->serial; if (msc < 0) { - fprintf(stderr, "\tframe %d displayed early by %lld frames\n", (int)(ce->serial - target - 60), (long long)msc); ret += -msc; - if (-msc > earliest) + if (-msc > earliest) { + fprintf(stderr, "\tframe %d displayed early by %lld frames\n", (int)(ce->serial - target - 60), (long long)msc); earliest = -msc; + } early++; - } else if (msc > 1) { /* allow the frame to slip by a vblank */ + } else if (msc > 0) { ret += msc; - if (msc > latest) + if (msc > latest) { + fprintf(stderr, "\tframe %d displayed late by %lld frames\n", (int)(ce->serial - target - 60), (long long)msc); latest = msc; + } late++; } complete = ce->serial == target + 60 + N_VBLANKS; -- cgit v1.2.3