Commit 03ed5f6c by Ian Elliott Committed by Commit Bot

Revert "Instantiate rx::DisplayEGL when device type EGL is selected"

This reverts commit 7455b544. Reason for revert: This appears to break the "Linux FYI Ozone (Intel)" bots on the chromium.gpu.fyi waterfall. Ozone means ChromeOS. Original change's description: > Instantiate rx::DisplayEGL when device type EGL is selected > > Define EGL_PLATFORM_ANGLE_DEVICE_TYPE_EGL_ANGLE that should be > used to request a driver egl-backed implementation with ANGLE. > > Bug: angleproject:4328 > Change-Id: I6871d3a27e2bfc02af9815dcf86ae1cb6524f0cc > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2030038 > Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> > Reviewed-by: Geoff Lang <geofflang@chromium.org> TBR=geofflang@chromium.org,syoussefi@chromium.org,jonahr@google.com,julien.isorce@chromium.org Change-Id: I8aec6c2783b0acb67d3315d351cdc9e526f58d6b No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:4328 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2091864Reviewed-by: 's avatarIan Elliott <ianelliott@google.com> Commit-Queue: Ian Elliott <ianelliott@google.com>
parent 1a5c7a16
Name
ANGLE_platform_angle_device_type_egl_angle
Name Strings
EGL_ANGLE_platform_angle_device_type_egl_angle
Contributors
Julien Isorce, Oblong
Contacts
Julien Isorce, Oblong (jisorce 'at' oblong 'dot' com)
Status
Draft
Version
Version 1, 2020-03-03
Number
EGL Extension XXX
Extension Type
EGL client extension
Dependencies
Requires EGL_ANGLE_platform_angle_opengl.
Overview
This extension enables choosing the driver's EGL implementation when it is
available.
New Types
None
New Procedures and Functions
None
New Tokens
Accepted as values for the EGL_PLATFORM_ANGLE_DEVICE_TYPE_ANGLE
attribute:
EGL_PLATFORM_ANGLE_DEVICE_TYPE_EGL_ANGLE 0x348E
Additions to the EGL Specification
None.
New Behavior
When calling eglGetPlatformDisplay:
To request a driver egl-backed implementation with ANGLE, the value of
EGL_PLATFORM_ANGLE_TYPE_ANGLE should be
EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE or
EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE
and the value of EGL_PLATFORM_ANGLE_DEVICE_TYPE_ANGLE should be
EGL_PLATFORM_ANGLE_DEVICE_TYPE_EGL_ANGLE.
If EGL_PLATFORM_ANGLE_DEVICE_TYPE_ANGLE is
EGL_PLATFORM_ANGLE_DEVICE_TYPE_EGL_ANGLE and
EGL_PLATFORM_ANGLE_TYPE_ANGLE is not
EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE or is not
EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE then an EGL_BAD_ATTRIBUTE error is
is generated and EGL_NO_DISPLAY is returned.
Issues
None
Revision History
Version 1, 2020-03-03 (Julien Isorce)
- Initial draft
......@@ -97,11 +97,6 @@
#define EGL_PLATFORM_ANGLE_DEVICE_TYPE_SWIFTSHADER_ANGLE 0x3487
#endif /* EGL_ANGLE_platform_angle_device_type_swiftshader */
#ifndef EGL_ANGLE_platform_angle_device_type_egl_angle
#define EGL_ANGLE_platform_angle_device_type_egl_angle
#define EGL_PLATFORM_ANGLE_DEVICE_TYPE_EGL_ANGLE 0x348E
#endif /* EGL_ANGLE_platform_angle_device_type_egl_angle */
#ifndef EGL_ANGLE_platform_angle_context_virtualization
#define EGL_ANGLE_platform_angle_context_virtualization 1
#define EGL_PLATFORM_ANGLE_CONTEXT_VIRTUALIZATION_ANGLE 0x3481
......
......@@ -1392,7 +1392,6 @@ std::vector<std::string> ClientExtensions::getStrings() const
InsertExtensionString("EGL_ANGLE_platform_angle", platformANGLE, &extensionStrings);
InsertExtensionString("EGL_ANGLE_platform_angle_d3d", platformANGLED3D, &extensionStrings);
InsertExtensionString("EGL_ANGLE_platform_angle_d3d11on12", platformANGLED3D11ON12, &extensionStrings);
InsertExtensionString("EGL_ANGLE_platform_angle_device_type_egl_angle", platformANGLEDeviceTypeEGLANGLE, &extensionStrings);
InsertExtensionString("EGL_ANGLE_platform_angle_device_type_swiftshader", platformANGLEDeviceTypeSwiftShader, &extensionStrings);
InsertExtensionString("EGL_ANGLE_platform_angle_opengl", platformANGLEOpenGL, &extensionStrings);
InsertExtensionString("EGL_ANGLE_platform_angle_null", platformANGLENULL, &extensionStrings);
......
......@@ -1116,9 +1116,6 @@ struct ClientExtensions
// EGL_ANGLE_platform_angle_device_type_swiftshader
bool platformANGLEDeviceTypeSwiftShader = false;
// EGL_ANGLE_platform_angle_device_type_egl_angle
bool platformANGLEDeviceTypeEGLANGLE = false;
};
} // namespace egl
......
......@@ -50,11 +50,8 @@
#if defined(ANGLE_ENABLE_OPENGL)
# if defined(ANGLE_PLATFORM_WINDOWS)
# include "libANGLE/renderer/gl/wgl/DisplayWGL.h"
# elif defined(ANGLE_PLATFORM_LINUX)
# include "libANGLE/renderer/gl/egl/DisplayEGL.h"
# if defined(ANGLE_USE_X11)
# include "libANGLE/renderer/gl/glx/DisplayGLX.h"
# endif
# elif defined(ANGLE_USE_X11)
# include "libANGLE/renderer/gl/glx/DisplayGLX.h"
# elif defined(ANGLE_PLATFORM_MACOS) || defined(ANGLE_PLATFORM_MACCATALYST)
# include "libANGLE/renderer/gl/cgl/DisplayCGL.h"
# elif defined(ANGLE_PLATFORM_IOS)
......@@ -219,9 +216,7 @@ EGLAttrib GetDeviceTypeFromEnvironment()
return EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE;
}
rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib displayType,
EGLAttrib deviceType,
const DisplayState &state)
rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib displayType, const DisplayState &state)
{
ASSERT(displayType != EGL_PLATFORM_ANGLE_TYPE_DEFAULT_ANGLE);
rx::DisplayImpl *impl = nullptr;
......@@ -246,17 +241,8 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib displayType,
#if defined(ANGLE_ENABLE_OPENGL)
# if defined(ANGLE_PLATFORM_WINDOWS)
impl = new rx::DisplayWGL(state);
# elif defined(ANGLE_PLATFORM_LINUX)
if (deviceType == EGL_PLATFORM_ANGLE_DEVICE_TYPE_EGL_ANGLE)
{
impl = new rx::DisplayEGL(state);
# if defined(ANGLE_USE_X11)
}
else
{
impl = new rx::DisplayGLX(state);
# endif
}
# elif defined(ANGLE_USE_X11)
impl = new rx::DisplayGLX(state);
# elif defined(ANGLE_PLATFORM_MACOS) || defined(ANGLE_PLATFORM_MACCATALYST)
impl = new rx::DisplayCGL(state);
# elif defined(ANGLE_PLATFORM_IOS)
......@@ -280,17 +266,8 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib displayType,
#if defined(ANGLE_ENABLE_OPENGL)
# if defined(ANGLE_PLATFORM_WINDOWS)
impl = new rx::DisplayWGL(state);
# elif defined(ANGLE_PLATFORM_LINUX)
if (deviceType == EGL_PLATFORM_ANGLE_DEVICE_TYPE_EGL_ANGLE)
{
impl = new rx::DisplayEGL(state);
# if defined(ANGLE_USE_X11)
}
else
{
impl = new rx::DisplayGLX(state);
# endif
}
# elif defined(ANGLE_USE_X11)
impl = new rx::DisplayGLX(state);
# elif defined(ANGLE_USE_OZONE)
impl = new rx::DisplayOzone(state);
# elif defined(ANGLE_PLATFORM_ANDROID)
......@@ -454,9 +431,7 @@ Display *Display::GetDisplayFromNativeDisplay(EGLNativeDisplayType nativeDisplay
display->updateAttribsFromEnvironment(attribMap);
EGLAttrib displayType = display->mAttributeMap.get(EGL_PLATFORM_ANGLE_TYPE_ANGLE);
EGLAttrib deviceType = display->mAttributeMap.get(EGL_PLATFORM_ANGLE_DEVICE_TYPE_ANGLE);
rx::DisplayImpl *impl =
CreateDisplayFromAttribs(displayType, deviceType, display->getState());
rx::DisplayImpl *impl = CreateDisplayFromAttribs(displayType, display->getState());
if (impl == nullptr)
{
// No valid display implementation for these attributes
......@@ -1381,10 +1356,6 @@ static ClientExtensions GenerateClientExtensions()
extensions.x11Visual = true;
#endif
#if defined(ANGLE_PLATFORM_LINUX)
extensions.platformANGLEDeviceTypeEGLANGLE = true;
#endif
extensions.clientGetAllProcAddresses = true;
extensions.debug = true;
extensions.explicitContext = true;
......
......@@ -566,14 +566,6 @@ Error ValidateGetPlatformDisplayCommon(EGLenum platform,
}
break;
case EGL_PLATFORM_ANGLE_DEVICE_TYPE_EGL_ANGLE:
if (!clientExtensions.platformANGLEDeviceTypeEGLANGLE)
{
return EglBadAttribute() << "EGL_ANGLE_platform_angle_device_type_"
"egl_angle is not supported";
}
break;
case EGL_PLATFORM_ANGLE_DEVICE_TYPE_SWIFTSHADER_ANGLE:
if (!clientExtensions.platformANGLEDeviceTypeSwiftShader)
{
......
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