Commit 118e7195 by Corentin Wallez

EGLWindow: specify the device type only on d3d platform

BUG=angleproject:892 Change-Id: I2dda3a8d15e58d15a401258a5a64c5783ea1a132 Reviewed-on: https://chromium-review.googlesource.com/269666Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Tested-by: 's avatarCorentin Wallez <cwallez@chromium.org>
parent fe2f3d63
...@@ -99,16 +99,22 @@ bool EGLWindow::initializeGL(OSWindow *osWindow) ...@@ -99,16 +99,22 @@ bool EGLWindow::initializeGL(OSWindow *osWindow)
return false; return false;
} }
const EGLint displayAttributes[] = std::vector<EGLint> displayAttributes;
{ displayAttributes.push_back(EGL_PLATFORM_ANGLE_TYPE_ANGLE);
EGL_PLATFORM_ANGLE_TYPE_ANGLE, mPlatform.renderer, displayAttributes.push_back(mPlatform.renderer);
EGL_PLATFORM_ANGLE_MAX_VERSION_MAJOR_ANGLE, mPlatform.majorVersion, displayAttributes.push_back(EGL_PLATFORM_ANGLE_MAX_VERSION_MAJOR_ANGLE);
EGL_PLATFORM_ANGLE_MAX_VERSION_MINOR_ANGLE, mPlatform.minorVersion, displayAttributes.push_back(mPlatform.majorVersion);
EGL_PLATFORM_ANGLE_DEVICE_TYPE_ANGLE, mPlatform.deviceType, displayAttributes.push_back(EGL_PLATFORM_ANGLE_MAX_VERSION_MINOR_ANGLE);
EGL_NONE, displayAttributes.push_back(mPlatform.minorVersion);
};
if (mPlatform.renderer == EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE || mPlatform.renderer == EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE)
{
displayAttributes.push_back(EGL_PLATFORM_ANGLE_DEVICE_TYPE_ANGLE);
displayAttributes.push_back(mPlatform.deviceType);
}
displayAttributes.push_back(EGL_NONE);
mDisplay = eglGetPlatformDisplayEXT(EGL_PLATFORM_ANGLE_ANGLE, osWindow->getNativeDisplay(), displayAttributes); mDisplay = eglGetPlatformDisplayEXT(EGL_PLATFORM_ANGLE_ANGLE, osWindow->getNativeDisplay(), displayAttributes.data());
if (mDisplay == EGL_NO_DISPLAY) if (mDisplay == EGL_NO_DISPLAY)
{ {
destroyGL(); destroyGL();
......
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