From e06ed2554064781237430cfbd3abddd6c85126eb Mon Sep 17 00:00:00 2001 From: kkinnunen Date: Tue, 16 Feb 2016 23:15:40 -0800 Subject: Do not try to use GL_texture_rectangle on GL ES Do not try to use ARB_GL_texture_rectangle on GL ES. Command buffer exposes it, but it's not recommended. It also does not work with TexImage2D, and ANGLE does not have support for it on with GL ES 3.0 source context. Bug triggered only when trying to use command buffer in GL ES 3.0 mode. BUG=angleproject:1313 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1691853003 Review URL: https://codereview.chromium.org/1691853003 --- src/gpu/gl/GrGLCaps.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'src/gpu/gl') diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp index fd888d6c36..f23a5b80bc 100644 --- a/src/gpu/gl/GrGLCaps.cpp +++ b/src/gpu/gl/GrGLCaps.cpp @@ -228,13 +228,18 @@ void GrGLCaps::init(const GrContextOptions& contextOptions, } } - if ((kGL_GrGLStandard == standard && version >= GR_GL_VER(3, 1)) || - ctxInfo.hasExtension("GL_ARB_texture_rectangle")) { - // We also require textureSize() support for rectangle 2D samplers which was added in GLSL - // 1.40. - if (ctxInfo.glslGeneration() >= k140_GrGLSLGeneration) { - fRectangleTextureSupport = true; + if (kGL_GrGLStandard == standard) { + if (version >= GR_GL_VER(3, 1) || ctxInfo.hasExtension("GL_ARB_texture_rectangle")) { + // We also require textureSize() support for rectangle 2D samplers which was added in + // GLSL 1.40. + if (ctxInfo.glslGeneration() >= k140_GrGLSLGeneration) { + fRectangleTextureSupport = true; + } } + } else { + // Command buffer exposes this in GL ES context for Chromium reasons, + // but it should not be used. Also, at the time of writing command buffer + // lacks TexImage2D support and ANGLE lacks GL ES 3.0 support. } if (kGL_GrGLStandard == standard) { -- cgit v1.2.3