Mapbox-gl-native: RenderHeatmapLayer can incorrectly re-uses renderTexture if viewport size changes

Created on 16 Feb 2018  路  5Comments  路  Source: mapbox/mapbox-gl-native

Seen here: https://circleci.com/gh/mapbox/mapbox-gl-native/72526

I tried reproducing locally using yarn run test-render --shuffle --seed=SC1tQ4XiCv --recycle-map but didn't see anything. Is there a good way to use docker locally to spin up an equivalent of the gcc6 CI environment? Or trigger a CI build with a specific seed?

/cc @mourner @brunoabinader

bug tests

All 5 comments

Oops, didn't realize I needed a debug flag set. I can reproduce locally with BUILDTYPE=Debug npm run test-render -- --recycle-map --shuffle --seed=SC1tQ4XiCv

Good to see the random seed works as expected @ChrisLoer - please let me know if there is anything else I can help with :bowing_man:

From my past experiences with test failures like these, most (if not all) of these were related to some leftover render state from a previous render that affects the current one - I'd bet checking the heatmap render layer code for hints on these.

I think I found it:

https://github.com/mapbox/mapbox-gl-native/blob/06213d9145d3b20b63e235cc25678fd76dc296d0/src/mbgl/renderer/layers/render_heatmap_layer.cpp#L57-L75

We need to re-initialize the renderTexture if the size has changed, but if we don't support half-float textures, we don't re-initialize because of that final if (!renderTexture) check.

Fixed against release-boba in #11279.

Was this page helpful?
0 / 5 - 0 ratings