Hash :
69194e5f
Author :
Date :
2019-07-17T15:35:10
Reduce variance in TextureUploadPerf. This reduces the test time to run in several ms instead of almost seconds per iteration. It allows us to use the perf test runner harness to check test performance more accurately by increasing the sample count. It first reduces the test iteration count to reduce total test time. It also refactors the test contents to not allocate new objects and memory with every test iteration. This gives a better sampling of what the test is obsering: texture upload performance. Also allows tests that like to track GPU time to be used with the NULL device option. Bug: angleproject:3712 Change-Id: Idacc3e3b424f8882d7680769b27d1f04146ea65d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1707112 Reviewed-by: Tobin Ehlis <tobine@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
//
// Copyright (c) 2017 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// DrawCallPerfParams.cpp:
// Parametrization for performance tests for ANGLE draw call overhead.
//
#include "DrawCallPerfParams.h"
#include <sstream>
DrawCallPerfParams::DrawCallPerfParams()
{
majorVersion = 2;
minorVersion = 0;
windowWidth = 64;
windowHeight = 64;
// Lower the iteration count in debug.
#if !defined(NDEBUG)
iterationsPerStep = 100;
#else
iterationsPerStep = 20000;
#endif
runTimeSeconds = 10.0;
numTris = 1;
offscreen = false;
}
DrawCallPerfParams::~DrawCallPerfParams() = default;
std::string DrawCallPerfParams::suffix() const
{
std::stringstream strstr;
strstr << RenderTestParams::suffix();
if (numTris == 0)
{
strstr << "_validation_only";
}
if (offscreen)
{
strstr << "_offscreen";
}
return strstr.str();
}
using namespace angle::egl_platform;
namespace params
{
DrawCallPerfParams DrawCallD3D11()
{
DrawCallPerfParams params;
params.eglParameters = D3D11();
return params;
}
DrawCallPerfParams DrawCallD3D9()
{
DrawCallPerfParams params;
params.eglParameters = D3D9();
return params;
}
DrawCallPerfParams DrawCallOpenGL()
{
DrawCallPerfParams params;
params.eglParameters = OPENGL_OR_GLES();
return params;
}
DrawCallPerfParams DrawCallValidation()
{
DrawCallPerfParams params;
params.eglParameters = DEFAULT();
params.numTris = 0;
params.runTimeSeconds = 5.0;
return params;
}
DrawCallPerfParams DrawCallVulkan()
{
DrawCallPerfParams params;
params.eglParameters = VULKAN();
return params;
}
DrawCallPerfParams DrawCallWGL()
{
DrawCallPerfParams params;
params.driver = angle::GLESDriverType::SystemWGL;
return params;
}
} // namespace params