Commit af5756a1 by Corentin Wallez

Only support ES3 if texture swizzling is available

On OSX 10.8 with an Intel HD 3000 we were wrongly exposing ES3 when texture swizzling was not available. BUG=angleproject:891 Change-Id: If71acdc1943ab2f013dc80cd28eab130c32fb201 Reviewed-on: https://chromium-review.googlesource.com/303392Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Tryjob-Request: Corentin Wallez <cwallez@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Tested-by: 's avatarCorentin Wallez <cwallez@chromium.org>
parent 6d85f039
......@@ -511,6 +511,22 @@ void GenerateCaps(const FunctionsGL *functions, gl::Caps *caps, gl::TextureCapsM
LimitVersion(maxSupportedESVersion, gl::Version(2, 0));
}
// Can't support ES3 without texture swizzling
if (!functions->isAtLeastGL(gl::Version(3, 3)) &&
!functions->hasGLExtension("GL_ARB_texture_swizzle") &&
!functions->hasGLExtension("GL_EXT_texture_swizzle") &&
!functions->isAtLeastGLES(gl::Version(3, 0)))
{
LimitVersion(maxSupportedESVersion, gl::Version(2, 0));
// Texture swizzling is required to work around the luminance texture format not being
// present in the core profile
if (functions->profile & GL_CONTEXT_CORE_PROFILE_BIT)
{
LimitVersion(maxSupportedESVersion, gl::Version(0, 0));
}
}
// Extension support
extensions->setTextureExtensionSupport(*textureCapsMap);
extensions->elementIndexUint = functions->standard == STANDARD_GL_DESKTOP ||
......
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