mirror of
https://github.com/godotengine/godot-angle-static.git
synced 2026-01-08 14:09:42 +03:00
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 <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Jamie Madill <jmadill@chromium.org>
This commit is contained in:
committed by
Angle LUCI CQ
parent
9e086ee175
commit
54176f07ac
@@ -711,7 +711,7 @@ bool IsPlatformAvailable(const PlatformParameters ¶m)
|
||||
// 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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user