-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Mac M1+WASM: many_buttons
extreme memory usage
#18257
Comments
many_buttons
extreme memory usage
Really good investigative work on all fronts. That's super frustrating. |
I'm also running into this, but from a different route so here's what I can tell so far. Apparently, when you use the same index buffer for multiple draw calls in the same queue, ANGLE's Metal backend uploads one copy of the buffer to the GPU for each call. In other words, to experience this memory explosion you need the combination of two conditions:
My project meets the first condition because of a separate phenomenon ( This case with
Update/clarification: the ANGLE quirks mentioned above (making copies of index buffers, generating index buffers even though The reason why the ANGLE-generated buffers suddenly got larger at d70b4a3 may be related to the buffer allocation logic here where it seems like it has to use the same size for all the buffers in the pool, and that gets stuck at the largest size allocated so far. To fix this, bevy would need to either not use |
Bevy version
Tested on master
4f6241178fa75263fb1fa961874f843684dd7b9a
, as well as0.15.3
, and0.14.2
,0.13.2
,0.12.1
. (it does not occur on0.11.3
)Relevant system information
What you did
Run the many_buttons example on chrome or safari: https://bevyengine.org/examples/stress-tests/many-buttons/
What went wrong
The memory usage of the
Google Chrome Helper (GPU)
shoots up to 10GB and webgl2 crashes for the entire browser, until the browser is restarted.On Linux+x11+nvidia, it only took 260MiB VRAM and and 1GB RAM.
Additional information
args.no_text = true;
fixes it.The text was updated successfully, but these errors were encountered: