Commit 391f38c9 by Cody Northrop Committed by Commit Bot

Capture/Replay: Add Manhattan to TracePerfTest

This CL also adds the ability for a perf test to elect to ignore GL errors during replay. Otherwise, errors will cause the test to fail. We have known failures with Manhattan that don't affect replay. Test: angle_perftests.exe --gtest_filter="*Trace*" Bug: angleproject:4091 Change-Id: I36268a9f80754f338e52208273e889d2404b7eed Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2090663 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent dcf20853
...@@ -189,6 +189,7 @@ ANGLEPerfTest::ANGLEPerfTest(const std::string &name, ...@@ -189,6 +189,7 @@ ANGLEPerfTest::ANGLEPerfTest(const std::string &name,
mBackend(backend), mBackend(backend),
mStory(story), mStory(story),
mGPUTimeNs(0), mGPUTimeNs(0),
mIgnoreErrors(false),
mSkipTest(false), mSkipTest(false),
mStepsToRun(std::numeric_limits<unsigned int>::max()), mStepsToRun(std::numeric_limits<unsigned int>::max()),
mNumStepsPerformed(0), mNumStepsPerformed(0),
...@@ -648,7 +649,11 @@ void ANGLERenderTest::step() ...@@ -648,7 +649,11 @@ void ANGLERenderTest::step()
mOSWindow->messageLoop(); mOSWindow->messageLoop();
#if defined(ANGLE_ENABLE_ASSERTS) #if defined(ANGLE_ENABLE_ASSERTS)
EXPECT_EQ(static_cast<GLenum>(GL_NO_ERROR), glGetError()); // Some gfxbench tests have expected errors that don't affect replay
if (!mIgnoreErrors)
{
EXPECT_EQ(static_cast<GLenum>(GL_NO_ERROR), glGetError());
}
#endif // defined(ANGLE_ENABLE_ASSERTS) #endif // defined(ANGLE_ENABLE_ASSERTS)
} }
......
...@@ -88,6 +88,7 @@ class ANGLEPerfTest : public testing::Test, angle::NonCopyable ...@@ -88,6 +88,7 @@ class ANGLEPerfTest : public testing::Test, angle::NonCopyable
std::string mStory; std::string mStory;
Timer mTimer; Timer mTimer;
uint64_t mGPUTimeNs; uint64_t mGPUTimeNs;
bool mIgnoreErrors;
bool mSkipTest; bool mSkipTest;
std::unique_ptr<perf_test::PerfResultReporter> mReporter; std::unique_ptr<perf_test::PerfResultReporter> mReporter;
......
...@@ -14,6 +14,10 @@ ...@@ -14,6 +14,10 @@
#include "tests/perf_tests/DrawCallPerfParams.h" #include "tests/perf_tests/DrawCallPerfParams.h"
#include "util/egl_loader_autogen.h" #include "util/egl_loader_autogen.h"
#include "restricted_traces/manhattan_10_20/manhattan_10_20_capture_context1.h"
#include "restricted_traces/manhattan_1100_1110/manhattan_1100_1110_capture_context1.h"
#include "restricted_traces/manhattan_1440_1450/manhattan_1440_1450_capture_context1.h"
#include "restricted_traces/manhattan_750_760/manhattan_750_760_capture_context1.h"
#include "restricted_traces/trex_1300_1310/trex_1300_1310_capture_context1.h" #include "restricted_traces/trex_1300_1310/trex_1300_1310_capture_context1.h"
#include "restricted_traces/trex_200_210/trex_200_210_capture_context1.h" #include "restricted_traces/trex_200_210/trex_200_210_capture_context1.h"
#include "restricted_traces/trex_800_810/trex_800_810_capture_context1.h" #include "restricted_traces/trex_800_810/trex_800_810_capture_context1.h"
...@@ -32,6 +36,10 @@ void FramebufferChangeCallback(void *userData, GLenum target, GLuint framebuffer ...@@ -32,6 +36,10 @@ void FramebufferChangeCallback(void *userData, GLenum target, GLuint framebuffer
enum class TracePerfTestID enum class TracePerfTestID
{ {
Manhattan10,
Manhattan750,
Manhattan1100,
Manhattan1440,
TRex200, TRex200,
TRex800, TRex800,
TRex900, TRex900,
...@@ -44,7 +52,7 @@ struct TracePerfParams final : public RenderTestParams ...@@ -44,7 +52,7 @@ struct TracePerfParams final : public RenderTestParams
// Common default options // Common default options
TracePerfParams() TracePerfParams()
{ {
majorVersion = 2; majorVersion = 3;
minorVersion = 0; minorVersion = 0;
windowWidth = 1920; windowWidth = 1920;
windowHeight = 1080; windowHeight = 1080;
...@@ -62,6 +70,18 @@ struct TracePerfParams final : public RenderTestParams ...@@ -62,6 +70,18 @@ struct TracePerfParams final : public RenderTestParams
switch (testID) switch (testID)
{ {
case TracePerfTestID::Manhattan10:
strstr << "_manhattan_10";
break;
case TracePerfTestID::Manhattan750:
strstr << "_manhattan_750";
break;
case TracePerfTestID::Manhattan1100:
strstr << "_manhattan_1100";
break;
case TracePerfTestID::Manhattan1440:
strstr << "_manhattan_1440";
break;
case TracePerfTestID::TRex200: case TracePerfTestID::TRex200:
strstr << "_trex_200"; strstr << "_trex_200";
break; break;
...@@ -143,6 +163,34 @@ void TracePerfTest::initializeBenchmark() ...@@ -143,6 +163,34 @@ void TracePerfTest::initializeBenchmark()
switch (params.testID) switch (params.testID)
{ {
// For each case, bootstrap the trace // For each case, bootstrap the trace
case TracePerfTestID::Manhattan10:
mStartFrame = 10;
mEndFrame = 20;
mReplayFunc = manhattan_10_20::ReplayContext1Frame;
manhattan_10_20::SetBinaryDataDir(ANGLE_TRACE_DATA_DIR_manhattan_10_20);
manhattan_10_20::SetupContext1Replay();
break;
case TracePerfTestID::Manhattan750:
mStartFrame = 750;
mEndFrame = 760;
mReplayFunc = manhattan_750_760::ReplayContext1Frame;
manhattan_750_760::SetBinaryDataDir(ANGLE_TRACE_DATA_DIR_manhattan_750_760);
manhattan_750_760::SetupContext1Replay();
break;
case TracePerfTestID::Manhattan1100:
mStartFrame = 1100;
mEndFrame = 1110;
mReplayFunc = manhattan_1100_1110::ReplayContext1Frame;
manhattan_1100_1110::SetBinaryDataDir(ANGLE_TRACE_DATA_DIR_manhattan_1100_1110);
manhattan_1100_1110::SetupContext1Replay();
break;
case TracePerfTestID::Manhattan1440:
mStartFrame = 1440;
mEndFrame = 1450;
mReplayFunc = manhattan_1440_1450::ReplayContext1Frame;
manhattan_1440_1450::SetBinaryDataDir(ANGLE_TRACE_DATA_DIR_manhattan_1440_1450);
manhattan_1440_1450::SetupContext1Replay();
break;
case TracePerfTestID::TRex200: case TracePerfTestID::TRex200:
mStartFrame = 200; mStartFrame = 200;
mEndFrame = 210; mEndFrame = 210;
...@@ -179,6 +227,8 @@ void TracePerfTest::initializeBenchmark() ...@@ -179,6 +227,8 @@ void TracePerfTest::initializeBenchmark()
ASSERT_TRUE(mEndFrame > mStartFrame); ASSERT_TRUE(mEndFrame > mStartFrame);
getWindow()->setVisible(true); getWindow()->setVisible(true);
mIgnoreErrors = true;
} }
void TracePerfTest::destroyBenchmark() {} void TracePerfTest::destroyBenchmark() {}
...@@ -346,7 +396,7 @@ using namespace params; ...@@ -346,7 +396,7 @@ using namespace params;
using P = TracePerfParams; using P = TracePerfParams;
std::vector<P> gTestsWithID = CombineWithValues({P()}, AllEnums<TracePerfTestID>(), CombineTestID); std::vector<P> gTestsWithID = CombineWithValues({P()}, AllEnums<TracePerfTestID>(), CombineTestID);
std::vector<P> gTestsWithRenderer = CombineWithFuncs(gTestsWithID, {GL<P>, Vulkan<P>}); std::vector<P> gTestsWithRenderer = CombineWithFuncs(gTestsWithID, {Vulkan<P>});
ANGLE_INSTANTIATE_TEST_ARRAY(TracePerfTest, gTestsWithRenderer); ANGLE_INSTANTIATE_TEST_ARRAY(TracePerfTest, gTestsWithRenderer);
} // anonymous namespace } // anonymous namespace
manhattan_10_20
manhattan_10_20.tar.gz
manhattan_1100_1110
manhattan_1100_1110.tar.gz
manhattan_1440_1450
manhattan_1440_1450.tar.gz
manhattan_750_760
manhattan_750_760.tar.gz
trex_200_210 trex_200_210
trex_200_210.tar.gz trex_200_210.tar.gz
trex_800_810 trex_800_810
......
...@@ -44,7 +44,7 @@ out/Release/bin/run_angle_perftests --gtest_filter=TracePerfTest* ...@@ -44,7 +44,7 @@ out/Release/bin/run_angle_perftests --gtest_filter=TracePerfTest*
## Updating traces ## Updating traces
The current TRex traces were captured on Windows with an Nvidia driver. The Manhattan and TRex traces were captured on Windows with an Intel driver (due to better compressed texture support).
Update START and END for each range. Update START and END for each range.
...@@ -77,6 +77,7 @@ export TFW_PACKAGE_DIR=../../../build/linux/testfw_Release/tfw-dev ...@@ -77,6 +77,7 @@ export TFW_PACKAGE_DIR=../../../build/linux/testfw_Release/tfw-dev
export ANGLE_DEFAULT_PLATFORM=vulkan export ANGLE_DEFAULT_PLATFORM=vulkan
export LD_LIBRARY_PATH=. export LD_LIBRARY_PATH=.
# TRex
export START=200 export START=200
export END=210 export END=210
export LABEL=trex export LABEL=trex
...@@ -85,7 +86,18 @@ export ANGLE_CAPTURE_LABEL=${LABEL}_${START}_${END} ...@@ -85,7 +86,18 @@ export ANGLE_CAPTURE_LABEL=${LABEL}_${START}_${END}
export ANGLE_CAPTURE_FRAME_START=$START export ANGLE_CAPTURE_FRAME_START=$START
export ANGLE_CAPTURE_FRAME_END=$END export ANGLE_CAPTURE_FRAME_END=$END
export ANGLE_CAPTURE_OUT_DIR=../../../../../angle/src/tests/perf_tests/restricted_traces/${LABEL}_${START}_${END} export ANGLE_CAPTURE_OUT_DIR=../../../../../angle/src/tests/perf_tests/restricted_traces/${LABEL}_${START}_${END}
../bin/testfw_app -b $TFW_PACKAGE_DIR --gfx egl -w 512 -h 512 -t gl_trex --ei -frame_step_time=40 ../bin/testfw_app -b $TFW_PACKAGE_DIR --gfx egl -w 1920 -h 1080 -t gl_trex --ei -frame_step_time=40
# Manhattan
export START=10
export END=20
export LABEL=manhattan
mkdir -p ../../../../../angle/src/tests/perf_tests/restricted_traces/${LABEL}_${START}_${END}
export ANGLE_CAPTURE_LABEL=${LABEL}_${START}_${END}
export ANGLE_CAPTURE_FRAME_START=$START
export ANGLE_CAPTURE_FRAME_END=$END
export ANGLE_CAPTURE_OUT_DIR=../../../../../angle/src/tests/perf_tests/restricted_traces/${LABEL}_${START}_${END}
../bin/testfw_app -b $TFW_PACKAGE_DIR --gfx egl -w 1920 -h 1080 -t gl_manhattan --ei -frame_step_time=40
``` ```
## Upload to the cloud ## Upload to the cloud
...@@ -96,6 +108,10 @@ upload_to_google_storage.py --bucket chrome-angle-capture-binaries --archive tre ...@@ -96,6 +108,10 @@ upload_to_google_storage.py --bucket chrome-angle-capture-binaries --archive tre
upload_to_google_storage.py --bucket chrome-angle-capture-binaries --archive trex_800_810 upload_to_google_storage.py --bucket chrome-angle-capture-binaries --archive trex_800_810
upload_to_google_storage.py --bucket chrome-angle-capture-binaries --archive trex_900_910 upload_to_google_storage.py --bucket chrome-angle-capture-binaries --archive trex_900_910
upload_to_google_storage.py --bucket chrome-angle-capture-binaries --archive trex_1300_1310 upload_to_google_storage.py --bucket chrome-angle-capture-binaries --archive trex_1300_1310
upload_to_google_storage.py --bucket chrome-angle-capture-binaries --archive manhattan_10_20
upload_to_google_storage.py --bucket chrome-angle-capture-binaries --archive manhattan_750_760
upload_to_google_storage.py --bucket chrome-angle-capture-binaries --archive manhattan_1100_1110
upload_to_google_storage.py --bucket chrome-angle-capture-binaries --archive manhattan_1440_1450
``` ```
## Adding new tests ## Adding new tests
......
...@@ -8,6 +8,10 @@ ...@@ -8,6 +8,10 @@
import("../../../../gni/angle.gni") import("../../../../gni/angle.gni")
_tests = [ _tests = [
"manhattan_10_20",
"manhattan_750_760",
"manhattan_1100_1110",
"manhattan_1440_1450",
"trex_200_210", "trex_200_210",
"trex_800_810", "trex_800_810",
"trex_900_910", "trex_900_910",
......
12433a3b2bd5361b01f3e6c61d944ab1e6eb71a7
\ No newline at end of file
c34356e81fa26b101d44a5fec8679128ec64a5d8
\ No newline at end of file
abfda52fd83ca39e458f592b8be68a40d4b999bb
\ No newline at end of file
691bacbb88b11092a806c898c82853f276b77f8d
\ No newline at end of file
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