Only use sized format on IMG/ES3 for single channel.
authorbsalomon <bsalomon@google.com>
Tue, 14 Oct 2014 19:29:17 +0000 (12:29 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 14 Oct 2014 19:29:17 +0000 (12:29 -0700)
BUG=skia:2922

Review URL: https://codereview.chromium.org/638293004

src/gpu/gl/GrGpuGL.cpp

index 97f2a11..209edaa 100644 (file)
@@ -591,7 +591,8 @@ bool GrGpuGL::uploadTexData(const GrGLTexture::Desc& desc,
     // glTexImage2D for the internal format but will accept GL_R8.
     if (kNVIDIA_GrGLVendor == this->glContext().vendor() ||
         kImagination_GrGLVendor == this->glContext().vendor()) {
-        if (kGLES_GrGLStandard == this->glStandard() && this->glVersion() >= GR_GL_VER(3, 0)) {
+        if (kGLES_GrGLStandard == this->glStandard() && this->glVersion() >= GR_GL_VER(3, 0) &&
+            kAlpha_8_GrPixelConfig == dataConfig) {
            useSizedFormat = true;
         }
     }