How to identify memory leaks in driver?

Hello,
I currently have some memory leaks in my program. The curious thing is, that it seems to be not from my code. It seems to be from driver code.

I try to explain what I’ve found so far:

I’m using Visual Studio with diagnostic tools and have looked where the allocated memory comes from. I do not think the memory is allocated by me, because I do delete all my memory which is not needed anymore and I would see whether I still use Vulkan objects or not because I’m holding all vulkan objects in a vector (If I wouldn’t do that, those objects wouldn’t be destroyed and the validation layer would have shown me that!). If I would use more objects or allocate more memory I would see it with diagnostic tools but that isn’t the case.

Assuming with this info the memory leak is should rather be located in an outside method. The diagnostic tools show me, that most of the allocation seems to happen in the vkQueuePresentKHR method.

I would like to know whether I’m wrong because this memory leak pushes my memory consumption after some resizes up to 10 GB ?

Feel free to ask me questions!

Assuming with this info the memory leak is should rather be located in an outside method. The diagnostic tools show me, that most of the allocation seems to happen in the vkQueuePresentKHR method.

I would like to know whether I’m wrong because this memory leak pushes my memory consumption after some resizes up to 10 GB ?

That almost sounds like connected to your other problem (the flickering). Is it cleaned up after Swapchain creation?
Well, driver error is always a possibility. Also you failing at some Vulkan requirement can cause undefined behavior including possibly memory leaks (and Validation Layers are not neccessarily catch-all).

I am almost sure I already read something like this here ([STRIKE]gimme a min. to look it up[/STRIKE]). Is this NVIDIA?
EDIT: https://forums.khronos.org/showthread.php/13107-Problems-on-NVIDIA-System?highlight=leak
It’s quite old though…

Thanks for that link. Just read it . I’m making some test e.g. changing present mode. Currently I definitely have some other graphic bugs too which have not occurred earlier.

If I find something usefull out I will immediately share my information!

Thanks for that link. Just read it . I’m making some test e.g. changing present mode. Currently I definitely have some other graphic bugs too which have not occurred earlier.

I will also try to fall back to an older driver. If it’s a driver bug I’ll report it. However that isn’t what I would like to have because that takes longer fix :frowning:

If I find something usefull out I will immediately share my information!

Thanks for that link. Just read it . I’m making some test e.g. changing present mode. Currently I definitely have some other graphic bugs too which have not occurred earlier.

I will also try to fall back to an older driver. If it’s a driver bug I’ll report it. However that isn’t what I would like to have because that takes longer to fix :(!

If I find something usefull out I will immediately share my information!

I tried using other present modes and I installed a new driver. Luckily one of my problems is solved. I do not encounter any graphic problems anymore but however I still do have a memory leak :mad:.

The next approach is to find other things which could cause a memory leak. Maybe I should contact Nvidias customer support :lol:.

PS:
Seems like that nobody cares about memory leaks :lol:!