Commit e8a78496 by Jamie Madill Committed by Commit Bot

D3D11: Restrict ES3 bits to FL 10.1.

We would advertise ES3 in some cases when we didn't support it. BUG=angleproject:1381 BUG=chromium:649101 Change-Id: I2a5bbc1d6153cdfc6c9c577aa0b82caf8482a42d Reviewed-on: https://chromium-review.googlesource.com/388190 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org>
parent 32dd62b8
...@@ -996,6 +996,7 @@ egl::ConfigSet Renderer11::generateConfigs() ...@@ -996,6 +996,7 @@ egl::ConfigSet Renderer11::generateConfigs()
gl::GetInternalFormatInfo(colorBufferInternalFormat); gl::GetInternalFormatInfo(colorBufferInternalFormat);
const gl::InternalFormat &depthStencilBufferFormatInfo = const gl::InternalFormat &depthStencilBufferFormatInfo =
gl::GetInternalFormatInfo(depthStencilBufferInternalFormat); gl::GetInternalFormatInfo(depthStencilBufferInternalFormat);
const gl::Version &maxVersion = getMaxSupportedESVersion();
egl::Config config; egl::Config config;
config.renderTargetFormat = colorBufferInternalFormat; config.renderTargetFormat = colorBufferInternalFormat;
...@@ -1013,15 +1014,22 @@ egl::ConfigSet Renderer11::generateConfigs() ...@@ -1013,15 +1014,22 @@ egl::ConfigSet Renderer11::generateConfigs()
config.colorBufferType = EGL_RGB_BUFFER; config.colorBufferType = EGL_RGB_BUFFER;
config.configCaveat = EGL_NONE; config.configCaveat = EGL_NONE;
config.configID = static_cast<EGLint>(configs.size() + 1); config.configID = static_cast<EGLint>(configs.size() + 1);
// Can only support a conformant ES2 with feature level greater than 10.0.
config.conformant = (mRenderer11DeviceCaps.featureLevel >= D3D_FEATURE_LEVEL_10_0)
? (EGL_OPENGL_ES2_BIT | EGL_OPENGL_ES3_BIT_KHR)
: 0;
// PresentPathFast may not be conformant // PresentPathFast may not be conformant
if (mPresentPathFastEnabled) config.conformant = 0;
if (!mPresentPathFastEnabled)
{ {
config.conformant = 0; // Can only support a conformant ES2 with feature level greater than 10.0.
if (mRenderer11DeviceCaps.featureLevel >= D3D_FEATURE_LEVEL_10_0)
{
config.conformant |= EGL_OPENGL_ES2_BIT;
}
// We can only support conformant ES3 on FL 10.1+
if (maxVersion.major >= 3)
{
config.conformant |= EGL_OPENGL_ES3_BIT_KHR;
}
} }
config.depthSize = depthStencilBufferFormatInfo.depthBits; config.depthSize = depthStencilBufferFormatInfo.depthBits;
...@@ -1035,11 +1043,14 @@ egl::ConfigSet Renderer11::generateConfigs() ...@@ -1035,11 +1043,14 @@ egl::ConfigSet Renderer11::generateConfigs()
config.nativeRenderable = EGL_FALSE; config.nativeRenderable = EGL_FALSE;
config.nativeVisualID = 0; config.nativeVisualID = 0;
config.nativeVisualType = EGL_NONE; config.nativeVisualType = EGL_NONE;
// Can't support ES3 at all without feature level 10.0
config.renderableType = // Can't support ES3 at all without feature level 10.1
EGL_OPENGL_ES2_BIT | ((mRenderer11DeviceCaps.featureLevel >= D3D_FEATURE_LEVEL_10_0) config.renderableType = EGL_OPENGL_ES2_BIT;
? EGL_OPENGL_ES3_BIT_KHR if (maxVersion.major >= 3)
: 0); {
config.renderableType |= EGL_OPENGL_ES3_BIT_KHR;
}
config.sampleBuffers = 0; // FIXME: enumerate multi-sampling config.sampleBuffers = 0; // FIXME: enumerate multi-sampling
config.samples = 0; config.samples = 0;
config.stencilSize = depthStencilBufferFormatInfo.stencilBits; config.stencilSize = depthStencilBufferFormatInfo.stencilBits;
......
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