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

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

Issue 2026393004: Add a caps bit to enable/disable the new manual mip-mapper (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 7 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/GrGLCaps.h ('k') | src/gpu/gl/GrGLGpu.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLCaps.cpp
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index 6aa94dee0d13bf71c395aded2ff0399827a7a7af..88ed455bb11cb6c2678af3acdb35751ab9fdefe0 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -50,6 +50,7 @@ GrGLCaps::GrGLCaps(const GrContextOptions& contextOptions,
fPartialFBOReadIsSlow = false;
fMipMapLevelAndLodControlSupport = false;
fRGBAToBGRAReadbackConversionsAreSlow = false;
+ fDoManualMipmapping = false;
fBlitFramebufferSupport = kNone_BlitFramebufferSupport;
@@ -543,6 +544,14 @@ void GrGLCaps::init(const GrContextOptions& contextOptions,
fSampleShadingSupport = true;
}
+ // Manual mip-mapping requires mip-level sampling control.
+ // Additionally, Adreno330 will produce empty mip-maps for the very smallest mips with
+ // our manual (draw-call) implementation.
+ if (fMipMapLevelAndLodControlSupport &&
+ kAdreno3xx_GrGLRenderer != ctxInfo.renderer()) {
+ fDoManualMipmapping = true;
+ }
+
// Requires fTextureRedSupport, fTextureSwizzleSupport, msaa support, ES compatibility have
// already been detected.
this->initConfigTable(ctxInfo, gli, glslCaps);
« no previous file with comments | « src/gpu/gl/GrGLCaps.h ('k') | src/gpu/gl/GrGLGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698