diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2015-02-12 12:49:57 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2015-02-12 13:51:04 +0000 |
commit | 51f184edfb2c09ea512c45cfe468a68406a8f6da (patch) | |
tree | f94fb2614853d3ad37e8c9ca802b54c11e0efe45 /test | |
parent | ac1eb7f7c976b45b63b0ca3000ddfe1be2ccce62 (diff) |
test/present: Tighten the accuracy requirements
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'test')
-rw-r--r-- | test/present-test.c | 22 |
1 files changed, 14 insertions, 8 deletions
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; |