Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
Disable depth in heatmap offscreen rendering.
Browse files Browse the repository at this point in the history
It triggers Metal depth stencil validation error since depth test is enabled with no depth attachment.
  • Loading branch information
astojilj committed Mar 2, 2020
1 parent 8c0f90c commit 42469cd
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions src/mbgl/renderer/layers/render_heatmap_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,21 +130,19 @@ void RenderHeatmapLayer::render(PaintParameters& parameters) {

checkRenderability(parameters, programInstance.activeBindingCount(allAttributeBindings));

programInstance.draw(
parameters.context,
*renderPass,
gfx::Triangles(),
parameters.depthModeForSublayer(0, gfx::DepthMaskType::ReadOnly),
gfx::StencilMode::disabled(),
gfx::ColorMode::additive(),
gfx::CullFaceMode::disabled(),
*bucket.indexBuffer,
bucket.segments,
allUniformValues,
allAttributeBindings,
HeatmapProgram::TextureBindings{},
getID()
);
programInstance.draw(parameters.context,
*renderPass,
gfx::Triangles(),
gfx::DepthMode::disabled(),
gfx::StencilMode::disabled(),
gfx::ColorMode::additive(),
gfx::CullFaceMode::disabled(),
*bucket.indexBuffer,
bucket.segments,
allUniformValues,
allAttributeBindings,
HeatmapProgram::TextureBindings{},
getID());
}

} else if (parameters.pass == RenderPass::Translucent) {
Expand Down

0 comments on commit 42469cd

Please sign in to comment.