From fb8d40ae6754ef1becd09cd91d45b1f980cf19e5 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Fri, 21 Jul 2017 01:17:50 -0700 Subject: [core] Work around Adreno 2xx GPU bugs (#9573) --- src/mbgl/gl/context.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/mbgl/gl/context.cpp b/src/mbgl/gl/context.cpp index 35683cff89..1a8d5c0775 100644 --- a/src/mbgl/gl/context.cpp +++ b/src/mbgl/gl/context.cpp @@ -615,6 +615,13 @@ void Context::setDrawMode(const TriangleStrip&) { void Context::setDepthMode(const DepthMode& depth) { if (depth.func == DepthMode::Always && !depth.mask) { depthTest = false; + + // Workaround for rendering errors on Adreno 2xx GPUs. Depth-related state should + // not matter when the depth test is disabled, but on these GPUs it apparently does. + // https://github.com/mapbox/mapbox-gl-native/issues/9164 + depthFunc = depth.func; + depthMask = depth.mask; + depthRange = depth.range; } else { depthTest = true; depthFunc = depth.func; -- cgit v1.2.1