aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-08-20 12:22:48 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-08-20 12:22:48 +0000
commitc0b9b20ba65a5105f31d0641c7e892d7b14983d9 (patch)
tree2c5de50e4238ea29599a71d816e86722ddf3a3cc /src
parent31acc11977815402e4ef2681350f8559285bec97 (diff)
Changed rules about sized internal formats on GLES3.
R=jvanverth@google.com Author: bsalomon@google.com Review URL: https://chromiumcodereview.appspot.com/22823006 git-svn-id: http://skia.googlecode.com/svn/trunk@10806 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r--src/gpu/gl/GrGLUtil.cpp3
-rw-r--r--src/gpu/gl/GrGLUtil.h1
-rw-r--r--src/gpu/gl/GrGpuGL.cpp13
3 files changed, 13 insertions, 4 deletions
diff --git a/src/gpu/gl/GrGLUtil.cpp b/src/gpu/gl/GrGLUtil.cpp
index 8440c574ea..99efeaf6a6 100644
--- a/src/gpu/gl/GrGLUtil.cpp
+++ b/src/gpu/gl/GrGLUtil.cpp
@@ -206,6 +206,9 @@ GrGLVendor GrGLGetVendorFromString(const char* vendorString) {
if (0 == strcmp(vendorString, "Intel")) {
return kIntel_GrGLVendor;
}
+ if (0 == strcmp(vendorString, "Qualcomm")) {
+ return kQualcomm_GrGLVendor;
+ }
}
return kOther_GrGLVendor;
}
diff --git a/src/gpu/gl/GrGLUtil.h b/src/gpu/gl/GrGLUtil.h
index b8a96e5140..9a82b0b97a 100644
--- a/src/gpu/gl/GrGLUtil.h
+++ b/src/gpu/gl/GrGLUtil.h
@@ -23,6 +23,7 @@ enum GrGLVendor {
kARM_GrGLVendor,
kImagination_GrGLVendor,
kIntel_GrGLVendor,
+ kQualcomm_GrGLVendor,
kOther_GrGLVendor
};
diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp
index c95edb740b..c10df6c7e8 100644
--- a/src/gpu/gl/GrGpuGL.cpp
+++ b/src/gpu/gl/GrGpuGL.cpp
@@ -610,9 +610,14 @@ bool GrGpuGL::uploadTexData(const GrGLTexture::Desc& desc,
GrGLenum internalFormat;
GrGLenum externalFormat;
GrGLenum externalType;
- // glTexStorage requires sized internal formats on both desktop and ES. ES
- // glTexImage requires an unsized format.
- if (!this->configToGLFormats(dataConfig, useTexStorage, &internalFormat,
+ // glTexStorage requires sized internal formats on both desktop and ES. ES2
+ // requires an unsized format for glTexImage. ES3 has relaxed this restriction.
+ // Qualcomm Adreno drivers seem to have issues with the relaxed ES3 rules.
+ bool useSizedInternalFormat = useTexStorage ||
+ kDesktop_GrGLBinding == this->glBinding() ||
+ (this->glVersion() >= GR_GL_VER(3,0) &&
+ kQualcomm_GrGLVendor != this->glContext().info().vendor());
+ if (!this->configToGLFormats(dataConfig, useSizedInternalFormat, &internalFormat,
&externalFormat, &externalType)) {
return false;
}
@@ -809,7 +814,7 @@ bool GrGpuGL::createRenderTargetObjects(int width, int height,
if (!desc->fRTFBOID ||
!desc->fMSColorRenderbufferID ||
!this->configToGLFormats(desc->fConfig,
- // GLES requires sized internal formats
+ // ES2 and ES3 require sized internal formats for rb storage.
kES_GrGLBinding == this->glBinding(),
&msColorFormat,
NULL,