summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2017-07-21 01:17:50 -0700
committerTobrun <tobrun@mapbox.com>2017-07-21 15:04:36 +0200
commitea337866e9870e95a977308f0926b15e25c7a0ce (patch)
treed943ebfdf678cd7ebc3739b8309c4947d53de2a6
parentb34a5ab276145dd5499133738caf0e8d6d30ddb7 (diff)
downloadqtlocation-mapboxgl-ea337866e9870e95a977308f0926b15e25c7a0ce.tar.gz
[core] Work around Adreno 2xx GPU bugs (#9573)
-rw-r--r--src/mbgl/gl/context.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mbgl/gl/context.cpp b/src/mbgl/gl/context.cpp
index 19ea9a514f..e5609db7b8 100644
--- a/src/mbgl/gl/context.cpp
+++ b/src/mbgl/gl/context.cpp
@@ -564,6 +564,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;