Modify Adreno 3xx workaround to toggle face culling rather than call glFlush.
This fixes some correctness issues introduced by the previous workaround in MSAA gm images. It hopefully improves performance regressions introduced in MSAA benchmarks from calling glFlush.
A comment on the workaround is updated to indicate that the original line-drop-out bug was seen on the N5 running driver 127.0. It simply showed up in different GMs that on the N7 running 127.0
Bug: skia:6755
Change-Id: Ief066fd9b223c043a80e7fe07ff13aac07a48970
Reviewed-on: https://skia-review.googlesource.com/19481
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index 867fef3..8287580 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -57,7 +57,7 @@
fClearTextureSupport = false;
fDrawArraysBaseVertexIsBroken = false;
fUseDrawToClearStencilClip = false;
- fRequiresFlushToDrawLinesAfterNonLines = false;
+ fRequiresCullFaceEnableDisableWhenDrawingLinesAfterNonLines = false;
fBlitFramebufferFlags = kNoSupport_BlitFramebufferFlag;
@@ -535,15 +535,13 @@
// - A Galaxy J5 (Adreno 306) running Android 6 with driver 140.0
// - A Nexus 7 2013 (Adreno 320) running Android 5 with driver 104.0
// - A Nexus 7 2013 (Adreno 320) running Android 6 with driver 127.0
+ // - A Nexus 5 (Adreno 330) running Android 6 with driver 127.0
// and not produced on:
// - A Nexus 7 2013 (Adreno 320) running Android 4 with driver 53.0
- // - A Nexus 5 (Adreno 330) running Android 6 with driver 127.0
- // The Nexus 5 and Nexus 7 with driver 127.0 had different git hashes in the GL_VERSION string
- // so it seems that either the N5's branch didn't have the bug or the bug affects Adreno 320
- // and 306 but not a 330. Further dissection is left to a future unfortunate soul if necessary.
+ // The particular lines that get dropped from test images varies across different devices.
if (kAdreno3xx_GrGLRenderer == ctxInfo.renderer() && kQualcomm_GrGLDriver == ctxInfo.driver() &&
ctxInfo.driverVersion() > GR_GL_DRIVER_VER(53, 0)) {
- fRequiresFlushToDrawLinesAfterNonLines = true;
+ fRequiresCullFaceEnableDisableWhenDrawingLinesAfterNonLines = true;
}
// Texture uploads sometimes seem to be ignored to textures bound to FBOS on Tegra3.