From 917124288ea1c4df4c9cf41f6410a836e0bb38f6 Mon Sep 17 00:00:00 2001 From: Lauren Budorick Date: Wed, 13 Jun 2018 11:03:01 -0700 Subject: [PATCH] Explicitly set stencil mode (disabled) in heatmap texture copy --- src/render/draw_heatmap.js | 1 + .../mapbox-gl-js#6806/expected.png | Bin 0 -> 7452 bytes .../regressions/mapbox-gl-js#6806/style.json | 47 ++++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 test/integration/render-tests/regressions/mapbox-gl-js#6806/expected.png create mode 100644 test/integration/render-tests/regressions/mapbox-gl-js#6806/style.json diff --git a/src/render/draw_heatmap.js b/src/render/draw_heatmap.js index 0b95f92b9e1..65100cd9f77 100644 --- a/src/render/draw_heatmap.js +++ b/src/render/draw_heatmap.js @@ -148,6 +148,7 @@ function renderTextureToMap(painter, layer) { colorRampTexture.bind(gl.LINEAR, gl.CLAMP_TO_EDGE); context.setDepthMode(DepthMode.disabled); + context.setStencilMode(StencilMode.disabled); const program = painter.useProgram('heatmapTexture'); diff --git a/test/integration/render-tests/regressions/mapbox-gl-js#6806/expected.png b/test/integration/render-tests/regressions/mapbox-gl-js#6806/expected.png new file mode 100644 index 0000000000000000000000000000000000000000..11c42091c4e3a97d69ab4a851610f6c9d6dc68e1 GIT binary patch literal 7452 zcmX9@bzIZi`}bZ9x?8%tK}j!NV|15eAPqyhzXEfVAV?~4=?;-bKt{(^>5hSPDub!i z@8EBr*S6RGInO!I^PKnde!mxI0M#TRWF)+E=MIUsmYNax{^$0Me;<5Sy85huufMg` zlud&EI$(^LxO0bT`u10UPw3a$eOvOa{lHb+Y1eU}#dhcU%KR{?HiS*Z$D@cwXdUt6 zlVR+0N;&lb2RH>PTSqo#V0X?(F3DI<7=G1@hxhot^#AbRe^seUN@r+-D?g+h`n)o% zRC{W*iV4r(?uxWs#Sy%Ky1>gO?aV)(bp}qr4;?L5Z9R_s_vI7H&a0fgWWFdED*F09 z-*|qechfVwkh|1$z_L5~emqcPb)+j@R*kwamah<^V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ests/regressions/mapbox-gl-js#6806/style.json b/test/integration/render-tests/regressions/mapbox-gl-js#6806/style.json new file mode 100644 index 00000000000..d67837a09b1 --- /dev/null +++ b/test/integration/render-tests/regressions/mapbox-gl-js#6806/style.json @@ -0,0 +1,47 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width": 64, + "description": "Contains two expected images (for ubyte-based rendering and half-float-based); one of them should pass depending on platform." + } + }, + "center": [ + 13.418056, + 52.4963 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "fill", + "type": "fill", + "source": "mapbox", + "source-layer": "building" + }, + { + "id": "poi_heat", + "type": "heatmap", + "source": "mapbox", + "source-layer": "poi_label", + "paint": {} + } + ] +}