mirror of
https://github.com/godotengine/godot-angle-static.git
synced 2026-01-03 14:09:33 +03:00
Perf tests: move calibration out of run() to SetUp()
calibrateStepsToRun is called from SetUp for ANGLERenderTest subclasses, but direct ANGLEPerfTest subclasses call it from run() instead. Moving it to SetUp for consistency - just need a check to avoid doing this for render tests and we already have a hack to do that. Bug: b/291604008 Change-Id: Ifddb60d55c6404660b0dff938a079fcd0545a6fb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4799388 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Roman Lavrov <romanl@google.com>
This commit is contained in:
committed by
Angle LUCI CQ
parent
2c624a5e05
commit
54770d8241
@@ -313,13 +313,7 @@ void ANGLEPerfTest::run()
|
||||
// GTEST_SKIP returns.
|
||||
}
|
||||
|
||||
if (mStepsToRun <= 0)
|
||||
{
|
||||
// We don't call finish between calibration steps when calibrating non-Render tests. The
|
||||
// Render tests will have already calibrated when this code is run.
|
||||
calibrateStepsToRun();
|
||||
ASSERT(mStepsToRun > 0);
|
||||
}
|
||||
ASSERT(mStepsToRun > 0);
|
||||
|
||||
uint32_t numTrials = OneFrame() ? 1 : gTestTrials;
|
||||
if (gVerboseLogging)
|
||||
@@ -438,7 +432,17 @@ void ANGLEPerfTest::runTrial(double maxRunTime, int maxStepsToRun, RunTrialPolic
|
||||
computeGPUTime();
|
||||
}
|
||||
|
||||
void ANGLEPerfTest::SetUp() {}
|
||||
void ANGLEPerfTest::SetUp()
|
||||
{
|
||||
if (!isRenderTest()) // ANGLERenderTest has its own calibration
|
||||
{
|
||||
if (mStepsToRun <= 0)
|
||||
{
|
||||
calibrateStepsToRun();
|
||||
ASSERT(mStepsToRun > 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ANGLEPerfTest::TearDown() {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user