Author :
Jamie Madill
Date :
2021-08-23 12:39:16
Hash :1b2febb9 Message :Trace Tests: Refactor calibration logic.
Instead of calling glFinish every step we now run a few warmup loops
to try and figure out the right step interval. On each run we refine
the step interval until we reach a number that completes in the
specific time after a single glFinish call. This method will use the
specified test time much more consistenty.
Also a couple other improvements. Will use more test time on the bots
because previously they were using a calibration/warmup time of 1
second per run loop, and this bumps it up to 3 per run loop.
Long explanation below.
What we did before:
step()
glFinish()
step()
glFinish()
.. repeat for "gCalibrationTime" seconds
then take the number of steps, the actual time ran, and compute an
estimate for "mStepsToRun".
When we run for real, we go:
step()
step()
step()
.. repeat for "mStepsToRun" steps.
glFinish()
this has an obvious performance difference, because after each step()
(one frame in a trace) you had a complete stall.
The new code first does the above to compute a tentative mStepsToRun,
then uses the results of the second run to compute a much more accurate
mStepsToRun by using the "actual" time it took to run the estimate.
Bug: angleproject:6090
Change-Id: I0ff19873580e13f2af5a145a21f5b1c59fb15795
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3114606
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>