Index: src/gpu/gl/GrGLGpu.cpp |
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp |
index 29841331c01d308d45b7c1948db0dfe54547a4a6..d58a961adcbfe7392871fc82fd6cc42b3bb29996 100644 |
--- a/src/gpu/gl/GrGLGpu.cpp |
+++ b/src/gpu/gl/GrGLGpu.cpp |
@@ -3344,14 +3344,17 @@ void GrGLGpu::bindTexture(int unitIdx, const GrTextureParams& params, GrGLTextur |
GL_CALL(TexParameteri(target, GR_GL_TEXTURE_MIN_FILTER, newTexParams.fMinFilter)); |
} |
if (setAll || newTexParams.fMaxMipMapLevel != oldTexParams.fMaxMipMapLevel) { |
- if (newTexParams.fMaxMipMapLevel != 0) { |
- this->setTextureUnit(unitIdx); |
- GL_CALL(TexParameteri(target, GR_GL_TEXTURE_MIN_LOD, 0)); |
- GL_CALL(TexParameteri(target, GR_GL_TEXTURE_BASE_LEVEL, 0)); |
- GL_CALL(TexParameteri(target, GR_GL_TEXTURE_MAX_LOD, |
- newTexParams.fMaxMipMapLevel)); |
- GL_CALL(TexParameteri(target, GR_GL_TEXTURE_MAX_LEVEL, |
- newTexParams.fMaxMipMapLevel)); |
+ // These are not supported in ES2 contexts |
+ if (this->glStandard() != kGLES_GrGLStandard && this->glVersion() != GR_GL_VER(2,0)) { |
bsalomon
2016/03/01 14:21:16
Can we make this a cap? Maybe mipMapLevelAndLodCon
cblume
2016/03/01 21:36:51
Done.
|
+ if (newTexParams.fMaxMipMapLevel != 0) { |
+ this->setTextureUnit(unitIdx); |
+ GL_CALL(TexParameteri(target, GR_GL_TEXTURE_MIN_LOD, 0)); |
+ GL_CALL(TexParameteri(target, GR_GL_TEXTURE_BASE_LEVEL, 0)); |
+ GL_CALL(TexParameteri(target, GR_GL_TEXTURE_MAX_LOD, |
+ newTexParams.fMaxMipMapLevel)); |
+ GL_CALL(TexParameteri(target, GR_GL_TEXTURE_MAX_LEVEL, |
+ newTexParams.fMaxMipMapLevel)); |
+ } |
} |
} |
if (setAll || newTexParams.fWrapS != oldTexParams.fWrapS) { |