Commit b2b6265b by Corentin Wallez

Display[GLX|CGL]: correctly set the config conformant bits

Reland with a fix for a compilation that happened because of a bad rebase. Previously there was a TODO to check if we supported ES3 before setting the conformant bitfield. Now it is done. BUG=angleproject:1188 Change-Id: I3ef2bd2bc71fb61c465085d32cf08a633904caa6 Reviewed-on: https://chromium-review.googlesource.com/312271Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Tested-by: 's avatarCorentin Wallez <cwallez@chromium.org>
parent ac0f9b1f
...@@ -151,6 +151,10 @@ egl::ConfigSet DisplayCGL::generateConfigs() const ...@@ -151,6 +151,10 @@ egl::ConfigSet DisplayCGL::generateConfigs() const
// TODO(cwallez): generate more config permutations // TODO(cwallez): generate more config permutations
egl::ConfigSet configs; egl::ConfigSet configs;
const gl::Version &maxVersion = getMaxSupportedESVersion();
ASSERT(maxVersion >= gl::Version(2, 0));
bool supportsES3 = maxVersion >= gl::Version(3, 0);
egl::Config config; egl::Config config;
// Native stuff // Native stuff
...@@ -197,8 +201,8 @@ egl::ConfigSet DisplayCGL::generateConfigs() const ...@@ -197,8 +201,8 @@ egl::ConfigSet DisplayCGL::generateConfigs() const
config.renderTargetFormat = GL_RGBA8; config.renderTargetFormat = GL_RGBA8;
config.depthStencilFormat = GL_DEPTH24_STENCIL8; config.depthStencilFormat = GL_DEPTH24_STENCIL8;
config.conformant = EGL_OPENGL_ES2_BIT | EGL_OPENGL_ES3_BIT_KHR; config.conformant = EGL_OPENGL_ES2_BIT | (supportsES3 ? EGL_OPENGL_ES3_BIT_KHR : 0);
config.renderableType = EGL_OPENGL_ES2_BIT | EGL_OPENGL_ES3_BIT_KHR; config.renderableType = config.conformant;
config.matchNativePixmap = EGL_NONE; config.matchNativePixmap = EGL_NONE;
......
...@@ -340,6 +340,10 @@ egl::ConfigSet DisplayGLX::generateConfigs() const ...@@ -340,6 +340,10 @@ egl::ConfigSet DisplayGLX::generateConfigs() const
bool hasSwapControl = mGLX.hasExtension("GLX_EXT_swap_control"); bool hasSwapControl = mGLX.hasExtension("GLX_EXT_swap_control");
const gl::Version &maxVersion = getMaxSupportedESVersion();
ASSERT(maxVersion >= gl::Version(2, 0));
bool supportsES3 = maxVersion >= gl::Version(3, 0);
int contextRedSize = getGLXFBConfigAttrib(mContextConfig, GLX_RED_SIZE); int contextRedSize = getGLXFBConfigAttrib(mContextConfig, GLX_RED_SIZE);
int contextGreenSize = getGLXFBConfigAttrib(mContextConfig, GLX_GREEN_SIZE); int contextGreenSize = getGLXFBConfigAttrib(mContextConfig, GLX_GREEN_SIZE);
int contextBlueSize = getGLXFBConfigAttrib(mContextConfig, GLX_BLUE_SIZE); int contextBlueSize = getGLXFBConfigAttrib(mContextConfig, GLX_BLUE_SIZE);
...@@ -488,9 +492,10 @@ egl::ConfigSet DisplayGLX::generateConfigs() const ...@@ -488,9 +492,10 @@ egl::ConfigSet DisplayGLX::generateConfigs() const
// TODO(cwallez) wildly guessing these formats, another TODO says they should be removed anyway // TODO(cwallez) wildly guessing these formats, another TODO says they should be removed anyway
config.renderTargetFormat = GL_RGBA8; config.renderTargetFormat = GL_RGBA8;
config.depthStencilFormat = GL_DEPTH24_STENCIL8; config.depthStencilFormat = GL_DEPTH24_STENCIL8;
// TODO(cwallez) Fill after determining the GL version we are using and what ES version it supports
config.conformant = EGL_OPENGL_ES2_BIT | EGL_OPENGL_ES3_BIT_KHR; config.conformant = EGL_OPENGL_ES2_BIT | (supportsES3 ? EGL_OPENGL_ES3_BIT_KHR : 0);
config.renderableType = EGL_OPENGL_ES2_BIT | EGL_OPENGL_ES3_BIT_KHR; config.renderableType = config.conformant;
// TODO(cwallez) I have no idea what this is // TODO(cwallez) I have no idea what this is
config.matchNativePixmap = EGL_NONE; config.matchNativePixmap = EGL_NONE;
......
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