-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Hillshade layers leak GPU memory #7690
Comments
ChrisLoer
added a commit
that referenced
this issue
Dec 12, 2018
Fixes #7690 -- hillshade layers leak GPU memory.
6 tasks
ChrisLoer
added a commit
that referenced
this issue
Dec 12, 2018
Fixes #7690 -- hillshade layers leak GPU memory.
ChrisLoer
added a commit
that referenced
this issue
Dec 12, 2018
Fixes #7690 -- hillshade layers leak GPU memory.
ansis
pushed a commit
that referenced
this issue
Dec 12, 2018
Fixes #7690 -- hillshade layers leak GPU memory.
ansis
added a commit
that referenced
this issue
Dec 12, 2018
Fixes #7690 -- hillshade layers leak GPU memory.
pirxpilot
pushed a commit
to pirxpilot/mapbox-gl-js
that referenced
this issue
Jun 14, 2019
Fixes mapbox#7690 -- hillshade layers leak GPU memory.
pirxpilot
pushed a commit
to pirxpilot/mapbox-gl-js
that referenced
this issue
Jun 18, 2019
Fixes mapbox#7690 -- hillshade layers leak GPU memory.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The hillshade layer reuses webgl textures as a performance optimization, and stores the textures for reuse in a cache in the painter object. The problem is that when we go to reuse existing textures, we look them up based on tile size:
mapbox-gl-js/src/render/draw_hillshade.js
Line 91 in 64ebdda
But when we store them, we put them in a list based on the dimensions of their underlying texture:
mapbox-gl-js/src/render/painter.js
Lines 455 to 462 in 64ebdda
These are not necessarily the same. For instance on a retina screen, 256px raster dem tiles will have a 514px texture (256x2 + 1px border on either side).
The result is that we cache an unbounded number of textures that we'll never re-use.
Thanks @grorg for reporting this in #4695 (comment)
cc @mollymerp
The text was updated successfully, but these errors were encountered: