You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems like there is some kind of leak with the display pool. I haven't made a minimum reproducible example yet as I'm not sure exactly what's causing it yet. It still happens if I disable almost all of my passes except the main opaque pass, that's the furthest I've reduced the problem to so far. It seems to scale with the number of sub passes (leaks faster). It seems that it also causes this
to take more time each frame. It seems like cmd_begin_render_pass is taking longer each frame for every pass as well, not just the opaque one (like the blit to swap will also take longer). Eventually it can take over 1ms (at the start it takes around 2us).
I noticed that if I did an early submit before the swap, both the memory leak and the additional time spent per frame issue went away. graph.resolve().submit(&mut LazyPool::new(&render_state.device), 0, 0).unwrap();
Then I tried just resetting the display pool before display.resolve_image and that also seemed to resolve the issue: display.pool = Box::new(HashPool::new(&render_state.device));
Resizing the window also seems to reset the issue with the additional time spent each frame, but doesn't seem to free the leaked memory.
The text was updated successfully, but these errors were encountered:
DGriffin91
added a commit
to DGriffin91/screen-13
that referenced
this issue
Sep 18, 2024
It seems like there is some kind of leak with the display pool. I haven't made a minimum reproducible example yet as I'm not sure exactly what's causing it yet. It still happens if I disable almost all of my passes except the main opaque pass, that's the furthest I've reduced the problem to so far. It seems to scale with the number of sub passes (leaks faster). It seems that it also causes this
screen-13/src/graph/resolver.rs
Line 614 in bdc4a81
cmd_begin_render_pass
is taking longer each frame for every pass as well, not just the opaque one (like the blit to swap will also take longer). Eventually it can take over 1ms (at the start it takes around 2us).Using https://crates.io/crates/leak-detect-allocator I found 4 additional instances of this showing up each frame:
I noticed that if I did an early submit before the swap, both the memory leak and the additional time spent per frame issue went away.
graph.resolve().submit(&mut LazyPool::new(&render_state.device), 0, 0).unwrap();
Then I tried just resetting the display pool before
display.resolve_image
and that also seemed to resolve the issue:display.pool = Box::new(HashPool::new(&render_state.device));
Resizing the window also seems to reset the issue with the additional time spent each frame, but doesn't seem to free the leaked memory.
The text was updated successfully, but these errors were encountered: