Better support for "vulkan-null" backend in trace tests.

This allows running the "null" Mock ICD with the Vulkan
secondaries version, and allow you to specify "vulkan-null"
as an ANGLE back-end generally.

Bug: angleproject:7852
Change-Id: Id8c59a167345a6079bd71916ae6ef9c41a6039a7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4089449
Reviewed-by: Shahbaz Youssefi <[email protected]>
Commit-Queue: Shahbaz Youssefi <[email protected]>
Auto-Submit: Jamie Madill <[email protected]>
This commit is contained in:
Jamie Madill authored and Angle LUCI CQ committed 2022-12-09 14:58:46 +00:00
1 parent 9e086ee175
commit 54176f07ac
2 files changed
+12 -7

No files matched your search

@@ -711,7 +711,7 @@ bool IsPlatformAvailable(const PlatformParameters &param)
// Disable "null" device when not on ANGLE or in D3D9.
if (param.getDeviceType() == EGL_PLATFORM_ANGLE_DEVICE_TYPE_NULL_ANGLE)
{
if (param.driver != GLESDriverType::AngleEGL)
if (!IsANGLE(param.driver))
return false;
if (param.getRenderer() == EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE)
return false;
+11 -6
View File
@@ -76,6 +76,7 @@ const DisplayTypeInfo kDisplayTypes[] = {
{"null", EGL_PLATFORM_ANGLE_TYPE_NULL_ANGLE},
{"swiftshader", EGL_PLATFORM_ANGLE_TYPE_VULKAN_ANGLE},
{"vulkan", EGL_PLATFORM_ANGLE_TYPE_VULKAN_ANGLE},
{"vulkan-null", EGL_PLATFORM_ANGLE_TYPE_VULKAN_ANGLE},
};
} // anonymous namespace
@@ -248,13 +249,17 @@ uint32_t GetPlatformANGLETypeFromArg(const char *useANGLEArg, uint32_t defaultPl
uint32_t GetANGLEDeviceTypeFromArg(const char *useANGLEArg, uint32_t defaultDeviceType)
{
if (useANGLEArg && strcmp(useANGLEArg, "swiftshader") == 0)
if (useANGLEArg)
{
return EGL_PLATFORM_ANGLE_DEVICE_TYPE_SWIFTSHADER_ANGLE;
}
else
{
return defaultDeviceType;
if (strcmp(useANGLEArg, "swiftshader") == 0)
{
return EGL_PLATFORM_ANGLE_DEVICE_TYPE_SWIFTSHADER_ANGLE;
}
if (strstr(useANGLEArg, "null") != 0)
{
return EGL_PLATFORM_ANGLE_DEVICE_TYPE_NULL_ANGLE;
}
}
return defaultDeviceType;
}
} // namespace angle