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

[core] DEMData: do decode on GPU (port mapbox/mapbox-gl-js#8694) #15512

Merged
merged 1 commit into from
Aug 30, 2019

Conversation

astojilj
Copy link
Contributor

This is first part of work on porting mapbox/mapbox-gl-js#8694 - in follow up patch(es) it is required to remove CPU side copy using 2d canvas support on all supported platforms, similar to approach taken in gl.js https://github.com/mapbox/mapbox-gl-js/pull/8694/files#diff-34dbe5f7de34dc4b9a8745dcde9bdc37R48

Decoding on CPU is removed.
Padding is still done in DEMData() but, instead of doing it while decoding, it is using memcpy to pad original values.

Rebase to latest mapbox-gl-js master and re-generate shaders. New render test debug/raster is ignored.

Partly fixes: #15503

@astojilj astojilj added the GL JS parity For feature parity with Mapbox GL JS label Aug 28, 2019
@astojilj astojilj self-assigned this Aug 28, 2019
src/mbgl/geometry/dem_data.cpp Outdated Show resolved Hide resolved
src/mbgl/geometry/dem_data.cpp Show resolved Hide resolved
src/mbgl/geometry/dem_data.cpp Show resolved Hide resolved
src/mbgl/geometry/dem_data.cpp Outdated Show resolved Hide resolved
src/mbgl/geometry/dem_data.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@alexshalamov alexshalamov left a comment

Choose a reason for hiding this comment

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

lgtm

@chloekraw chloekraw added the needs changelog Indicates PR needs a changelog entry prior to merging. label Aug 30, 2019
This is first part of work on porting mapbox/mapbox-gl-js#8694 - in follow up patch(es) it is required to remove CPU side copy using 2d canvas support on all supported platforms, similar to approach taken in gl.js  https://github.com/mapbox/mapbox-gl-js/pull/8694/files#diff-34dbe5f7de34dc4b9a8745dcde9bdc37R48

Decoding on CPU removed.
Padding is still done in DEMData() but, instead od doing it wwhile decoding, it is using memcpy to pad original values.

Rebase to latest mapbox-gl-js master and re-generate shaders.

Partly fixes: #15503
@astojilj
Copy link
Contributor Author

@chloekraw

I've tagged the issue #15503 with "needs changelog" and as this is only part of the fix of #15503 - here, I'm rebasing to gl-js and making the render tests pass, but the performance improvement will happen after porting 2d canvas part, that would remove CPU side copy using 2d canvas support on all supported platforms, similar to approach taken in gl.js https://github.com/mapbox/mapbox-gl-js/pull/8694/files#diff-34dbe5f7de34dc4b9a8745dcde9bdc37R48

@astojilj astojilj merged commit 4ba1270 into master Aug 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
GL JS parity For feature parity with Mapbox GL JS needs changelog Indicates PR needs a changelog entry prior to merging.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants