Commit cd1b1226 by Jamie Madill

perf_tests: Work around stalls in gl_null test teardown.

The Clear command in the draw call benchmark was not being properly no-op'ed. This would cause the driver to get a huge queue of GL command, which it would only flush when the test was torn down. This manifested as a 5+ second stall on test teardown. Looking at the clear command, it does some work with binding and then calling GL functions, so properly filtering out the driver commands would be a bit more complicated. For now, we can hack in a workaround for the draw call test (the only one that uses the GL NULL renderer at the moment) to not call clear when it would give us problems. BUG=620687 Change-Id: I64a2ed1883e8d3bf0d4c423c8bce0902ae9bf8df Reviewed-on: https://chromium-review.googlesource.com/352828Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent 218cf9ee
...@@ -180,7 +180,16 @@ void DrawCallPerfBenchmark::destroyBenchmark() ...@@ -180,7 +180,16 @@ void DrawCallPerfBenchmark::destroyBenchmark()
void DrawCallPerfBenchmark::drawBenchmark() void DrawCallPerfBenchmark::drawBenchmark()
{ {
glClear(GL_COLOR_BUFFER_BIT); // This workaround fixes a huge queue of graphics commands accumulating on the GL
// back-end. The GL back-end doesn't have a proper NULL device at the moment.
// TODO(jmadill): Remove this when/if we ever get a proper OpenGL NULL device.
const auto &eglParams = GetParam().eglParameters;
if (eglParams.deviceType != EGL_PLATFORM_ANGLE_DEVICE_TYPE_NULL_ANGLE ||
(eglParams.renderer != EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE &&
eglParams.renderer != EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE))
{
glClear(GL_COLOR_BUFFER_BIT);
}
const auto &params = GetParam(); const auto &params = GetParam();
......
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