Commit 626a4185 by Jamie Madill Committed by Commit Bot

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: 's avatarCody Northrop <cnorthrop@google.com> Reviewed-by: 's avatarCourtney Goeltzenleuchter <courtneygo@google.com>
parent f69fe097
......@@ -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();
......
......@@ -70,6 +70,14 @@ ParamsT VulkanMockICD(const ParamsT &in)
}
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)
{
ParamsT out = 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);
......
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