Commit 4a693565 by Corentin Wallez

Fix the named parameter for the IndexConversion perftest

It seems that the compiler didn't resolve the overloaded operator<< with the structure's grandparent structure. Fix it by explicitely casting to the grandparent before calling operator<<. Also provides slightly more information on the number of iterations/triangles. This wasn't caught with local testing as IndexConversion isn't compiled in angle_perftests on Linux. BUG=angleproject:1153 BUG=530226 Change-Id: Ifa602eb0728d052bc651f0dd030f9f880c00dc51 Reviewed-on: https://chromium-review.googlesource.com/298860Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Tested-by: 's avatarCorentin Wallez <cwallez@chromium.org>
parent 2aa3b436
......@@ -32,6 +32,16 @@ struct IndexConversionPerfParams final : public RenderTestParams
unsigned int numIndexTris;
};
// Provide a custom gtest parameter name function for IndexConversionPerfParams
// that includes the number of iterations and triangles in the test parameter name.
// This also fixes the resolution of the overloaded operator<< on MSVC.
std::ostream &operator<<(std::ostream &stream, const IndexConversionPerfParams &param)
{
const PlatformParameters &platform = param;
stream << platform << "_" << param.iterations << "_" << param.numIndexTris;
return stream;
}
class IndexConversionPerfTest : public ANGLERenderTest,
public ::testing::WithParamInterface<IndexConversionPerfParams>
{
......
......@@ -96,6 +96,10 @@ std::ostream &operator<<(std::ostream& stream, const PlatformParameters &pp)
// default
break;
case EGL_PLATFORM_ANGLE_DEVICE_TYPE_NULL_ANGLE:
stream << "_NULL";
break;
case EGL_PLATFORM_ANGLE_DEVICE_TYPE_REFERENCE_ANGLE:
stream << "_REFERENCE";
break;
......
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