Commit b76e350f by Jamie Madill

Fix the broken draw call perf test.

This was broken by the angle test platforms refactor patch, https://chromium-review.googlesource.com/#/c/276460/. It was leading to the wrong tests be executed for the perf tests, and also had bugs with supporting a default platform. BUG=None TEST=angle_perftests Change-Id: Ib99342d4189fd98bf93dce088d15afcecc4a7e37 Reviewed-on: https://chromium-review.googlesource.com/277036Tested-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarZhenyao Mo <zmo@chromium.org>
parent 7a1d9266
......@@ -17,11 +17,6 @@ using namespace angle;
namespace
{
EGLint NullDeviceType(bool useNullDevice)
{
return useNullDevice ? EGL_PLATFORM_ANGLE_DEVICE_TYPE_NULL_ANGLE : EGL_DONT_CARE;
}
struct DrawCallPerfParams final : public RenderTestParams
{
// Common default options
......@@ -189,31 +184,33 @@ void DrawCallPerfBenchmark::drawBenchmark()
ASSERT_GL_NO_ERROR();
}
using namespace egl_platform;
DrawCallPerfParams DrawCallPerfD3D11Params(bool useNullDevice)
{
DrawCallPerfParams params;
params.eglParameters = egl_platform::D3D11_NULL();
params.eglParameters = useNullDevice ? D3D11_NULL() : D3D11();
return params;
}
DrawCallPerfParams DrawCallPerfD3D9Params(bool useNullDevice)
{
DrawCallPerfParams params;
params.eglParameters = egl_platform::DEFAULT_NULL();
params.eglParameters = useNullDevice ? D3D9_NULL() : D3D9();
return params;
}
DrawCallPerfParams DrawCallPerfOpenGLParams(bool useNullDevice)
{
DrawCallPerfParams params;
params.eglParameters = egl_platform::D3D9_NULL();
params.eglParameters = useNullDevice ? OPENGL_NULL() : OPENGL();
return params;
}
DrawCallPerfParams DrawCallPerfValidationOnly()
{
DrawCallPerfParams params;
params.eglParameters = egl_platform::OPENGL();
params.eglParameters = DEFAULT();
params.iterations = 100;
params.numTris = 0;
params.runTimeSeconds = 5.0;
......
......@@ -64,6 +64,9 @@ std::ostream &operator<<(std::ostream& stream, const PlatformParameters &pp)
case EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE:
stream << "GLES";
break;
case EGL_PLATFORM_ANGLE_TYPE_DEFAULT_ANGLE:
stream << "DEFAULT";
break;
default:
UNREACHABLE();
break;
......@@ -108,10 +111,7 @@ namespace egl_platform
EGLPlatformParameters DEFAULT()
{
return EGLPlatformParameters(
EGL_PLATFORM_ANGLE_TYPE_DEFAULT_ANGLE,
EGL_DONT_CARE, EGL_DONT_CARE,
EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE);
return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_DEFAULT_ANGLE);
}
EGLPlatformParameters DEFAULT_NULL()
......@@ -303,6 +303,14 @@ EGLPlatformParameters OPENGL()
return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE);
}
EGLPlatformParameters OPENGL_NULL()
{
return EGLPlatformParameters(
EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE,
0, 0,
EGL_PLATFORM_ANGLE_DEVICE_TYPE_NULL_ANGLE);
}
EGLPlatformParameters OPENGLES()
{
return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE);
......
......@@ -67,6 +67,7 @@ EGLPlatformParameters D3D11_FL10_0_REFERENCE();
EGLPlatformParameters D3D11_FL9_3_REFERENCE();
EGLPlatformParameters OPENGL();
EGLPlatformParameters OPENGL_NULL();
EGLPlatformParameters OPENGLES();
......
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