Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use 1px border for DEM backfilling #7683

Merged
merged 1 commit into from
Dec 12, 2018

Conversation

andycalder
Copy link
Contributor

@andycalder andycalder commented Dec 7, 2018

This PR removes the empty 256 pixels of padding around DEM data. This padding means that the DEMData array buffer is ~4x as big as it needs to be, and we're uploading a ~4x demTexture to the GPU. A one pixel border is all we need for DEM backfilling. The demTexture is not mipmapped so I don't think it needs to be a power-of-two texture. A quick look at Chrome Dev Tools shows a big drop in memory usage on the hillshade debug page (119MB to 47MB). Benchmarks don't show anything notable.

Launch Checklist

  • briefly describe the changes in this PR
  • write tests for all new functionality
  • post benchmark scores
  • manually test the debug page

paint
layout
layerhillshade

Copy link
Member

@mourner mourner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great to me — thanks a lot for the PR!
@mollymerp anything that could possibly break with this change?

@mollymerp
Copy link
Contributor

yes – we initially were going to use mipmapping for the "openness" visualization, but had to scrub that because of hardware issues on some devices but the original power-of-two constraint snuck in. I don't think this should cause any problems.

I have ported this over to gl-native here mapbox/mapbox-gl-native#13550

thanks!

@mourner mourner merged commit 4d8c433 into mapbox:master Dec 12, 2018
pirxpilot pushed a commit to pirxpilot/mapbox-gl-js that referenced this pull request Jun 14, 2019
pirxpilot pushed a commit to pirxpilot/mapbox-gl-js that referenced this pull request Jun 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants