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

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

Issue 2042313002: Switch to a whitelist for manual mip-map generation (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add ATI to whitelist Created 4 years, 6 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 | « no previous file | src/gpu/gl/GrGLUtil.h » ('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 14c03d70a7de45742a1ec68fc6f1d3686225e9e5..260521187a657e7da93a66aa93d25b707842f1ef 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -546,13 +546,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.
- // At least some Mali chips (T604 in Nexus10) produces incorrect (wrt sRGB) mips using draws
+ // We support manual mip-map generation (via iterative downsampling draw calls). This fixes
+ // bugs on some cards/drivers that produce incorrect mip-maps for sRGB textures when using
+ // glGenerateMipmap. Our implementation requires mip-level sampling control. Additionally,
+ // it can be much slower (especially on mobile GPUs), so we opt-in only when necessary:
if (fMipMapLevelAndLodControlSupport &&
- kAdreno3xx_GrGLRenderer != ctxInfo.renderer() &&
- kARM_GrGLVendor != ctxInfo.vendor()) {
+ ((kIntel_GrGLVendor == ctxInfo.vendor()) ||
+ (kNVIDIA_GrGLDriver == ctxInfo.driver() && isMAC) ||
+ (kATI_GrGLVendor == ctxInfo.vendor()))) {
fDoManualMipmapping = true;
}
« no previous file with comments | « no previous file | src/gpu/gl/GrGLUtil.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698