I tried updating to 0.6.2 today, but when I started my game up the fps started dropping rather fast. Seems as if graphics memory is getting allocated constantly. Xorg will eventually freeze which also hints toward a graphics memory leak. I found that https://github.com/vulkano-rs/vulkano/commit/80e965aef51dd860822cfbc86583404a78f707ec caused the issue to start occurring.
I do make many new PersistentDescriptorSet every frame. I am not sure if there is a more proper way to do sets or not.
I do make many new PersistentDescriptorSet every frame. I am not sure if there is a more proper way to do sets or not.
Using a FixedSizeDescriptorSetsPool is better if you always use the same descriptor set layout.
Switched to using a pool instead, leaked was greatly reduced and I got a frames boost also.
I just have new persistent descriptors sets made when the window is resized, so hard to tell if the leak was limited to that specific use case. I created the set right before a draw command and then it is dropped right after that before the command buffer is executed. Not sure if that'd cause any issues. I can't seem to find a way to monitor graphics memory usage, so the testing I can do is limited.
This is happening because descriptor/descriptor_set/std_pool.rs:80 always evaluates to true, so pools are never reused.
It always evaluates to true because descriptor/descriptor_set/sys.rs:121-133 is flawed. That only returns Some(_) if all elements are greater, all elements are equal, or all elements are less. If there is a mix of elements that are greater and elements that are equal, then it returns None.
Pull request incoming to fix this.
Most helpful comment
This is happening because descriptor/descriptor_set/std_pool.rs:80 always evaluates to true, so pools are never reused.
It always evaluates to true because descriptor/descriptor_set/sys.rs:121-133 is flawed. That only returns
Some(_)if all elements are greater, all elements are equal, or all elements are less. If there is a mix of elements that are greater and elements that are equal, then it returnsNone.Pull request incoming to fix this.