aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl
diff options
context:
space:
mode:
authorGravatar kkinnunen <kkinnunen@nvidia.com>2016-02-16 23:15:40 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-02-16 23:15:40 -0800
commite06ed2554064781237430cfbd3abddd6c85126eb (patch)
treec2147e60dd51712df61b6dec84c334eadccebfd7 /src/gpu/gl
parent32a45f6c96f76e7c57c4ea924dc6b1789859cff7 (diff)
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
Diffstat (limited to 'src/gpu/gl')
-rw-r--r--src/gpu/gl/GrGLCaps.cpp17
1 files changed, 11 insertions, 6 deletions
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) {