-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
OOM with large font size #58
Comments
For individual glyph memory allocation Just curious, but what's the reason you're trying to use a large scale like 10 instead of changing the font size (through |
Nothing special about The former uses more than 10GiB VRAM and the latter uses only 20MiB. Here is a code: https://github.com/elbaro/glyphon-58 |
Thanks for the test case! There seems to be a problem somewhere when we're growing the atlas for large glyphs. It might have something to do with not being able to fit any glyphs into It looks like you can work around this for now by changing the atlas Line 29 in a74ce29
|
This seems like a problem in Specifically the allocation fails during https://github.com/nical/etagere/blob/95d6f376fa85a265fd4493a0bf371777196b33b4/src/bucketed.rs#L172 because I'll try to get this fixed upstream soon but you should be able to use the |
Opened nical/etagere#26 upstream to track this |
I've fixed nical/etagere#26 upstream but it will need a new release before we see those changes (or you could use a patch to use the git version). I'll keep this open for now though, because I also want to slightly change the growth strategy to reduce the amount of resizes we have to do to support bigger glyphs (probably just multiplying dimensions by a factor instead resizing by a constant amount each time). |
The growth strategy has also been changed in #74 so we can close this now. A new release with these changes has been released (0.4.1). |
Rendering a short string with a large font size and large
TextArea.scale
(still small in 4k monitors) causesAtlasFull
.Relaxing the texture limit to x4, TextAtlas keeps growing until OOM.
But then reducing TextArea.scale from 10 to 5 renders fine with only size=256.
Why does scale=10 use x100 more memory than scale=5?
The text was updated successfully, but these errors were encountered: