[Piglit] [PATCH 0/2] Check GL_TIMESTAMP units

Robert Bragg robert at sixbynine.org
Tue Sep 6 13:00:32 UTC 2016


GL timestamps queried via ARB_timer_query should have nanosecond units but I
had a suspicion we wouldn't have correct units for Gen graphics on Skylake and
so extended arb_timer_query/timestamp-get.c to query the gpu timestamp either
side of a sleep on the cpu with a known duration. This was able to confirm my
suspicion for Skylake.

I was a little surprised initially to also find that the clock drift for my
Haswell machine was greater than I would have guessed, but still it's probably
totally reasonable for typical GL_TIMESTAMP uses. I was seeing a drift of ~2
milliseconds in one second.

This test allows a drift of up to 3 milliseconds / sec, which is in line with
the kind of tolerance the test was already looking for, just for back-to-back
GL_TIMESTAMP queries.

Robert Bragg (2):
  util: Add piglit_delay_ns() api
  arb_timer_query: Add wall clock sanity checks

 tests/spec/arb_timer_query/timestamp-get.c | 51 +++++++++++++++++++++++++++++-
 tests/util/piglit-util.c                   | 29 ++++++++++++++---
 tests/util/piglit-util.h                   | 15 +++++++++
 3 files changed, 90 insertions(+), 5 deletions(-)

-- 
2.9.2



More information about the Piglit mailing list