summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2017-09-08 13:12:53 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-09-12 08:22:08 -0700
commitbb8dd4705ce2cfebbcee76441dcdacbca90ffcd8 (patch)
tree450d4273429cdc75806a602c8f60aece31ada790
parent73e9ba14390fc5da5c1fb2fc0392accb606e04ff (diff)
downloadqtlocation-mapboxgl-bb8dd4705ce2cfebbcee76441dcdacbca90ffcd8.tar.gz
[core] Fix fill layer z-fighting
Hand-ports b05e5ddd347a9362535ca33cefceae92c51c998f
-rw-r--r--src/mbgl/renderer/painter_fill.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mbgl/renderer/painter_fill.cpp b/src/mbgl/renderer/painter_fill.cpp
index cad76ace4f..7264735692 100644
--- a/src/mbgl/renderer/painter_fill.cpp
+++ b/src/mbgl/renderer/painter_fill.cpp
@@ -89,7 +89,9 @@ void Painter::renderFill(PaintParameters& parameters,
program.get(properties).draw(
context,
drawMode,
- depthModeForSublayer(sublayer, gl::DepthMode::ReadWrite),
+ depthModeForSublayer(sublayer, pass == RenderPass::Opaque
+ ? gl::DepthMode::ReadWrite
+ : gl::DepthMode::ReadOnly),
stencilModeForClipping(tile.clip),
colorModeForRenderPass(),
FillProgram::UniformValues {