diff options
-rw-r--r-- | gm/rectangletexture.cpp | 3 | ||||
-rw-r--r-- | src/gpu/gl/GrGLCaps.cpp | 5 | ||||
-rw-r--r-- | src/gpu/gl/GrGLDefines.h | 2 | ||||
-rw-r--r-- | tools/gpu/gl/GLTestContext.cpp | 7 |
4 files changed, 10 insertions, 7 deletions
diff --git a/gm/rectangletexture.cpp b/gm/rectangletexture.cpp index c22e420d68..ab58379e3e 100644 --- a/gm/rectangletexture.cpp +++ b/gm/rectangletexture.cpp @@ -73,7 +73,8 @@ protected: } if (!(kGL_GrGLStandard == glCtx->standard() && glCtx->version() >= GR_GL_VER(3, 1)) && - !glCtx->hasExtension("GL_ARB_texture_rectangle")) { + !(glCtx->hasExtension("GL_ARB_texture_rectangle") || + glCtx->hasExtension("GL_ANGLE_texture_rectangle"))) { return nullptr; } diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp index 8525a7b2b5..0e5ed52350 100644 --- a/src/gpu/gl/GrGLCaps.cpp +++ b/src/gpu/gl/GrGLCaps.cpp @@ -220,7 +220,8 @@ void GrGLCaps::init(const GrContextOptions& contextOptions, fBindUniformLocationSupport = ctxInfo.hasExtension("GL_CHROMIUM_bind_uniform_location"); if (kGL_GrGLStandard == standard) { - if (version >= GR_GL_VER(3, 1) || ctxInfo.hasExtension("GL_ARB_texture_rectangle")) { + if (version >= GR_GL_VER(3, 1) || ctxInfo.hasExtension("GL_ARB_texture_rectangle") || + ctxInfo.hasExtension("GL_ANGLE_texture_rectangle")) { // We also require textureSize() support for rectangle 2D samplers which was added in // GLSL 1.40. if (ctxInfo.glslGeneration() >= k140_GrGLSLGeneration) { @@ -2893,5 +2894,3 @@ GrBackendFormat GrGLCaps::onCreateFormatFromBackendTexture( return GrBackendFormat::MakeGL(glInfo.fFormat, glInfo.fTarget); } #endif - - diff --git a/src/gpu/gl/GrGLDefines.h b/src/gpu/gl/GrGLDefines.h index 8e7809f642..d861d866c7 100644 --- a/src/gpu/gl/GrGLDefines.h +++ b/src/gpu/gl/GrGLDefines.h @@ -1039,7 +1039,7 @@ /* GL_OES_EGL_image_external */ #define GR_GL_TEXTURE_EXTERNAL 0x8D65 -/* GL_ARB_texture_rectangle */ +/* GL_ARB_texture_rectangle or GL_ANGLE_texture_rectangle */ #define GR_GL_TEXTURE_RECTANGLE 0x84F5 /* GL_EXT_window_rectangles */ diff --git a/tools/gpu/gl/GLTestContext.cpp b/tools/gpu/gl/GLTestContext.cpp index 7a67a8a969..e11f1b0eef 100644 --- a/tools/gpu/gl/GLTestContext.cpp +++ b/tools/gpu/gl/GLTestContext.cpp @@ -317,8 +317,11 @@ void GLTestContext::finish() { GrGLint GLTestContext::createTextureRectangle(int width, int height, GrGLenum internalFormat, GrGLenum externalFormat, GrGLenum externalType, GrGLvoid* data) { - if (!(kGL_GrGLStandard == fGL->fStandard && GrGLGetVersion(fGL.get()) >= GR_GL_VER(3, 1)) && - !fGL->fExtensions.has("GL_ARB_texture_rectangle")) { + // Should match GrGLCaps check for fRectangleTextureSupport. + if (kGL_GrGLStandard != fGL->fStandard || + (GrGLGetVersion(fGL.get()) < GR_GL_VER(3, 1) && + !fGL->fExtensions.has("GL_ARB_texture_rectangle") && + !fGL->fExtensions.has("GL_ANGLE_texture_rectangle"))) { return 0; } |