Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(170)

Unified Diff: src/gpu/gl/GrGpuGL.cpp

Issue 22823006: Changed rules about sized internal formats on GLES3. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/gl/GrGLUtil.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGpuGL.cpp
===================================================================
--- src/gpu/gl/GrGpuGL.cpp (revision 10767)
+++ src/gpu/gl/GrGpuGL.cpp (working copy)
@@ -610,9 +610,14 @@
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 @@
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,
« no previous file with comments | « src/gpu/gl/GrGLUtil.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698