Commit 66d85686 by Austin Eng Committed by Commit Bot

Revert "Refactor DisplayGbm::generateConfigs"

This reverts commit 7d82d293. Reason for revert: Suspect CL failing on Linux FYI Ozone Original change's description: > Refactor DisplayGbm::generateConfigs > > Bug: angleproject:4809 > Change-Id: I5f352f737bbd53c78d9e01055c17eabd17d5fb8a > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2278667 > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Commit-Queue: Jiajia Qin <jiajia.qin@intel.com> TBR=geofflang@chromium.org,jiajia.qin@intel.com,jmadill@chromium.org Change-Id: I62c8a6a78d1ccfe8aa63bea7a9409229cd0059ab No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:4809, chromium:1105208 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2296041 Commit-Queue: Austin Eng <enga@chromium.org> Reviewed-by: 's avatarAustin Eng <enga@chromium.org>
parent e5c18475
......@@ -924,36 +924,24 @@ egl::Error DisplayGbm::makeCurrent(egl::Surface *drawSurface,
egl::ConfigSet DisplayGbm::generateConfigs()
{
gl::Version eglVersion(mEGL->majorVersion, mEGL->minorVersion);
ASSERT(eglVersion >= gl::Version(1, 4));
bool supportES3 =
(eglVersion >= gl::Version(1, 5) || mEGL->hasExtension("EGL_KHR_create_context")) &&
(mRenderer->getMaxSupportedESVersion() >= gl::Version(3, 0));
EGLint renderType = EGL_OPENGL_ES2_BIT | (supportES3 ? EGL_OPENGL_ES3_BIT : 0);
// clang-format off
std::vector<EGLint> configAttribs8888 =
{
EGL_COLOR_BUFFER_TYPE, EGL_RGB_BUFFER,
// CrOS doesn't support window and pixmaps?
EGL_SURFACE_TYPE, EGL_PBUFFER_BIT,
EGL_CONFIG_CAVEAT, EGL_NONE,
EGL_CONFORMANT, renderType,
EGL_RENDERABLE_TYPE, renderType,
EGL_RED_SIZE, 8,
EGL_GREEN_SIZE, 8,
EGL_BLUE_SIZE, 8,
EGL_ALPHA_SIZE, 8,
EGL_BUFFER_SIZE, 32,
EGL_DEPTH_SIZE, 24,
EGL_NONE
};
// clang-format on
mConfigAttribList = configAttribs8888;
return DisplayEGL::generateConfigs();
egl::ConfigSet configs;
egl::Config config;
config.bufferSize = 32;
config.redSize = 8;
config.greenSize = 8;
config.blueSize = 8;
config.alphaSize = 8;
config.depthSize = 24;
config.stencilSize = 8;
config.bindToTextureRGBA = EGL_TRUE;
config.renderableType = EGL_OPENGL_ES2_BIT;
config.surfaceType = EGL_WINDOW_BIT | EGL_PBUFFER_BIT;
config.renderTargetFormat = GL_RGBA8;
config.depthStencilFormat = GL_DEPTH24_STENCIL8;
configs.add(config);
return configs;
}
bool DisplayGbm::isValidNativeWindow(EGLNativeWindowType window) const
......
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