Commit 4340fcfa by Charlie Lao Committed by Commit Bot

Vulkan: Add command option to run app traces with minimum GPU work

This CL interposes the draw call API entries. If enabled by command line option "--minimize-gpu-work", it will override all draw calls to render a single GL_POINT instead. It forces view port and scissor size to 1x1. It forces all data copy to 1 texel or 1 byte. It ignores glGenerateMipmap call. The goal is to make the frame time reflect the driver CPU performance as much as possible so that we can use it to compare ANGLE vs native GLES on the driver overhead, as well as identifying CPU hot spot. Bug: b/184766477 Change-Id: Ie8b5b585e0ed55320fed7863da37cce419acc65f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2802858 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: 's avatarCody Northrop <cnorthrop@google.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent c2075d81
......@@ -26,6 +26,7 @@ int gTestTrials = 3;
bool gNoFinish = false;
bool gEnableAllTraceTests = false;
bool gRetraceMode = false;
bool gMinimizeGPUWork = 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.
......@@ -145,6 +146,10 @@ void ANGLEProcessPerfTestArgs(int *argc, char **argv)
{
gRetraceMode = true;
}
else if (strcmp("--minimize-gpu-work", argv[argIndex]) == 0)
{
gMinimizeGPUWork = true;
}
else
{
argv[argcOutCount++] = argv[argIndex];
......
......@@ -28,6 +28,7 @@ extern int gTestTrials;
extern bool gNoFinish;
extern bool gEnableAllTraceTests;
extern bool gRetraceMode;
extern bool gMinimizeGPUWork;
inline bool OneFrame()
{
......
......@@ -38,6 +38,7 @@ Several command-line arguments control how the tests run:
* `--trials`: Number of times to repeat testing. Defaults to 3.
* `--no-finish`: Don't call glFinish after each test trial.
* `--enable-all-trace-tests`: Offscreen and vsync-limited trace tests are disabled by default to reduce test time.
* `--minimize-gpu-work`: Modify API calls so that GPU work is reduced to minimum.
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