Commit a22a19a4 by Jamie Madill Committed by Commit Bot

Add a --no-finish option to the perf tests.

We can use this to re-capture replays. Bug: angleproject:5134 Change-Id: I765e0bbb66cfdd822ffa981f2b5533157d024cac Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2449161 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarCody Northrop <cnorthrop@google.com> Reviewed-by: 's avatarCourtney Goeltzenleuchter <courtneygo@google.com>
parent 57c6af7d
......@@ -773,7 +773,8 @@ void ANGLERenderTest::startTest() {}
void ANGLERenderTest::finishTest()
{
if (mTestParams.eglParameters.deviceType != EGL_PLATFORM_ANGLE_DEVICE_TYPE_NULL_ANGLE)
if (mTestParams.eglParameters.deviceType != EGL_PLATFORM_ANGLE_DEVICE_TYPE_NULL_ANGLE &&
!gNoFinish)
{
glFinish();
}
......
......@@ -21,6 +21,7 @@ const char *gScreenShotDir = nullptr;
bool gVerboseLogging = false;
double gTestTimeSeconds = 1.0;
int gTestTrials = 3;
bool gNoFinish = false;
// Default to three warmup loops. There's no science to this. More than two loops was experimentally
// helpful on a Windows NVIDIA setup when testing with Vulkan and native trace tests.
......@@ -111,6 +112,10 @@ void ANGLEProcessPerfTestArgs(int *argc, char **argv)
// Skip an additional argument.
argIndex++;
}
else if (strcmp("--no-finish", argv[argIndex]) == 0)
{
gNoFinish = true;
}
else
{
argv[argcOutCount++] = argv[argIndex];
......
......@@ -23,6 +23,7 @@ extern bool gVerboseLogging;
extern int gWarmupLoops;
extern double gTestTimeSeconds;
extern int gTestTrials;
extern bool gNoFinish;
inline bool OneFrame()
{
......
......@@ -34,6 +34,7 @@ Several command-line arguments control how the tests run:
* `--no-warmup`: Skip warming up the tests. Equivalent to `--warmup-steps 0`.
* `--test-time`: Run each test trial in a fixed time. Defaults to 1 second.
* `--trials`: Number of times to repeat testing. Defaults to 3.
* `--no-finish`: Don't call glFinish after each test trial.
For example, for an endless run with no warmup, run:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment