Commit 4c825e68 by Jamie Madill

Revert "eglGetPlatformDisplayEXT: validate device types are set only on d3d"

Depends on patch which is causing a failure in EGLSurfaceTest.MakeCurrentTwice BUG=None This reverts commit 0e7ee498. Change-Id: I7d11900c784bdb2a8963a824e89019b39a184cbe Reviewed-on: https://chromium-review.googlesource.com/269856Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Tested-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 118e7195
......@@ -148,7 +148,6 @@ EGLDisplay EGLAPIENTRY GetPlatformDisplayEXT(EGLenum platform, void *native_disp
bool majorVersionSpecified = false;
bool minorVersionSpecified = false;
bool enableAutoTrimSpecified = false;
bool deviceTypeSpecified = false;
if (attrib_list)
{
......@@ -215,6 +214,12 @@ EGLDisplay EGLAPIENTRY GetPlatformDisplayEXT(EGLenum platform, void *native_disp
break;
case EGL_PLATFORM_ANGLE_DEVICE_TYPE_ANGLE:
if (!clientExtensions.platformANGLED3D)
{
SetGlobalError(Error(EGL_BAD_ATTRIBUTE));
return EGL_NO_DISPLAY;
}
switch (curAttrib[1])
{
case EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE:
......@@ -228,7 +233,6 @@ EGLDisplay EGLAPIENTRY GetPlatformDisplayEXT(EGLenum platform, void *native_disp
return EGL_NO_DISPLAY;
}
deviceType = curAttrib[1];
deviceTypeSpecified = true;
break;
default:
......@@ -259,15 +263,6 @@ EGLDisplay EGLAPIENTRY GetPlatformDisplayEXT(EGLenum platform, void *native_disp
return EGL_NO_DISPLAY;
}
if (deviceTypeSpecified &&
platformType != EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE &&
platformType != EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE)
{
SetGlobalError(Error(EGL_BAD_ATTRIBUTE, "EGL_PLATFORM_ANGLE_DEVICE_TYPE_ANGLE requires a device type of "
"EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE or EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE."));
return EGL_NO_DISPLAY;
}
SetGlobalError(Error(EGL_SUCCESS));
EGLNativeDisplayType displayId = static_cast<EGLNativeDisplayType>(native_display);
......
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