Commit 0c35e0f4 by Brandon Schade Committed by Commit Bot

Add null default backend environment variable option

ANGLE_DEFAULT_PLATFORM environment variable now accepts 'null' as a valid option. This will set the default platform type to the null backend. Bug: angleproject:3893 Change-Id: Ieddcdf3ae840f927c1b276e56f3b753b67d9b73d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1784062Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarMohan Maiya <m.maiya@samsung.com> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
parent 7e44ec26
......@@ -142,7 +142,7 @@ rx::DisplayImpl *CreateDisplayFromDevice(Device *eglDevice, const DisplayState &
// On platforms with support for multiple back-ends, allow an environment variable to control
// the default. This is useful to run angle with benchmarks without having to modify the
// benchmark source. Possible values for this environment variable (ANGLE_DEFAULT_PLATFORM)
// are: vulkan, gl, d3d11.
// are: vulkan, gl, d3d11, null.
EGLAttrib GetDisplayTypeFromEnvironment()
{
std::string angleDefaultEnv = angle::GetEnvironmentVar("ANGLE_DEFAULT_PLATFORM");
......@@ -169,6 +169,13 @@ EGLAttrib GetDisplayTypeFromEnvironment()
}
#endif
#if defined(ANGLE_ENABLE_NULL)
if (angleDefaultEnv == "null")
{
return EGL_PLATFORM_ANGLE_TYPE_NULL_ANGLE;
}
#endif
#if defined(ANGLE_ENABLE_D3D11)
return EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE;
#elif defined(ANGLE_ENABLE_D3D9)
......
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