Commit 49babcbc by Amy Liu Committed by Commit Bot

Fix crash of MultithreadingTest end2end tests.

Extension platformANGLEContextVirtualization is currently only supported in the OpenGL backend, it's confused to validate it when the test is set up by WithNoVirtualContexts(). It'll generate crash when it's not OpenGL backend. Bug: angleproject:5636 Change-Id: Ib04fb4a3d29beaac5162e63af5ef1fd80c8a420c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2709821 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 6623a70f
...@@ -159,10 +159,21 @@ bool EGLWindow::initializeDisplay(OSWindow *osWindow, ...@@ -159,10 +159,21 @@ bool EGLWindow::initializeDisplay(OSWindow *osWindow,
displayAttributes.push_back(params.debugLayersEnabled); displayAttributes.push_back(params.debugLayersEnabled);
} }
const bool hasFeatureVirtualizationANGLE =
strstr(extensionString, "EGL_ANGLE_platform_angle_context_virtualization") != nullptr;
if (params.contextVirtualization != EGL_DONT_CARE) if (params.contextVirtualization != EGL_DONT_CARE)
{ {
displayAttributes.push_back(EGL_PLATFORM_ANGLE_CONTEXT_VIRTUALIZATION_ANGLE); if (hasFeatureVirtualizationANGLE)
displayAttributes.push_back(params.contextVirtualization); {
displayAttributes.push_back(EGL_PLATFORM_ANGLE_CONTEXT_VIRTUALIZATION_ANGLE);
displayAttributes.push_back(params.contextVirtualization);
}
else
{
fprintf(stderr,
"EGL_ANGLE_platform_angle_context_virtualization extension not active\n");
}
} }
if (params.platformMethods) if (params.platformMethods)
......
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