Trace Tests: Allow runs against SwiftShader.

SwiftShader can allow for a platform-indendent replay. This is useful
for re-tracing. By default disable the SwiftShader test configs unless
we pass in --enable-all-trace-tests.

Also disable the mock ICD trace tests by default.

Bug: angleproject:5134
Change-Id: Ibf1f3ebd6c17f15123705b7d4d9ddd6308f873f3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2502311
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
This commit is contained in:
Jamie Madill 2020-10-27 18:31:52 -04:00 коммит произвёл Commit Bot
Родитель f69fe0975c
Коммит 626a4185ea
3 изменённых файлов: 26 добавлений и 3 удалений

Просмотреть файл

@ -432,9 +432,16 @@ std::string RenderTestParams::backend() const
return "_unk";
}
if (eglParameters.deviceType == EGL_PLATFORM_ANGLE_DEVICE_TYPE_NULL_ANGLE)
switch (eglParameters.deviceType)
{
strstr << "_null";
case EGL_PLATFORM_ANGLE_DEVICE_TYPE_NULL_ANGLE:
strstr << "_null";
break;
case EGL_PLATFORM_ANGLE_DEVICE_TYPE_SWIFTSHADER_ANGLE:
strstr << "_swiftshader";
break;
default:
break;
}
return strstr.str();

Просмотреть файл

@ -69,6 +69,14 @@ ParamsT VulkanMockICD(const ParamsT &in)
return out;
}
template <typename ParamsT>
ParamsT VulkanSwiftShader(const ParamsT &in)
{
ParamsT out = in;
out.eglParameters = angle::egl_platform::VULKAN_SWIFTSHADER();
return out;
}
template <typename ParamsT>
ParamsT WGL(const ParamsT &in)
{

Просмотреть файл

@ -221,6 +221,13 @@ TracePerfTest::TracePerfTest()
mSkipTest = true;
}
if (param.eglParameters.deviceType != EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE &&
!gEnableAllTraceTests)
{
printf("Test skipped. Use --enable-all-trace-tests to run.\n");
mSkipTest = true;
}
if (param.testID == RestrictedTraceID::cod_mobile)
{
// TODO: http://anglebug.com/4967 Vulkan: GL_EXT_color_buffer_float not supported on Pixel 2
@ -839,7 +846,8 @@ std::vector<P> gTestsWithSurfaceType =
{SurfaceType::Offscreen, SurfaceType::Window, SurfaceType::WindowWithVSync},
CombineWithSurfaceType);
std::vector<P> gTestsWithRenderer =
CombineWithFuncs(gTestsWithSurfaceType, {Vulkan<P>, VulkanMockICD<P>, Native<P>});
CombineWithFuncs(gTestsWithSurfaceType,
{Vulkan<P>, VulkanMockICD<P>, VulkanSwiftShader<P>, Native<P>});
std::vector<P> gTestsWithoutMockICD = FilterWithFunc(gTestsWithRenderer, NoAndroidMockICD);
ANGLE_INSTANTIATE_TEST_ARRAY(TracePerfTest, gTestsWithoutMockICD);