Problems on NVIDIA - System

Hello guys,
i am programming a rendering engine with vulkan on my desktop pc using a AMD Radeon HD 7870.
Everything works fine on that system, but when i run the application on my laptop (using a gtx 765M), i have a horrible problem(s).
1.) The Application continously allocate memory on the heap and the FPS decreases with time aswell.

I investigated this and actually the “vkQueuePresentKHR()”-function causes this problem.
The Main-Difference between my Laptop and my Desktop is, that my Laptop is using the VK_PRESENT_MODE_MAILBOX (my desktop: immediate) mode.
I tryed the following to fix it:

  • change the amount of Swapchain-Images for the mail-box mode:
    –> Effect: Increasing Swapchain-Images until max-value of 8 decreases fps significantly (8: 5 FPS),
    Memory Leak still appears on VkQueuePresentKHR
  • using VK_PRESENT_MODE_FIFO_KHR and VK_PRESENT_MODE_FIFO_RELAXED_KHR:
    –> My second problem was gone, still “vkQueuePresentKHR” causes the memory leak

So my second problem is (i assume the first error somehow causes this), is that my GUI is sometimes flickering.
I am rendering the GUI with a separate renderpass which loads the same framebuffer attachment and use blending to draw the quads over the scene.
This flickering is gone when using one of the two swapchain-modes or when capping the fps to less than 60.
Interesting effect: When i clear the framebuffer attachment in the GUI-Renderpass (instead of load), the flickering actually causes to make the 3d-szene visible for a moment, which should definitely not happen.

I hope you can help me to figure out whats going on here.

Thanks in Advance
SH

do you have some kind of sync between the two renderpasses (pipeline barrier, subpass, dependency from/to external,…)?

mh no i havent, i tryed to sync my two command buffers (one for the 3D-szene, the other for the GUI… of course for each swapchain-image) with a semaphore, but things got more worse than before. Flickering all over the place and frame-times increases significantly.
I will reading the spec to synchronisation again and try a little bit soon.

Anyone here have an idea, why “vkQueuePresentKHR” causes the memory leak?

You might want to try backing up to driver version 365.19. With versions 368.xx, we’ve seen memory leaks, poor frame rates, and frame rates that decline over time.

Weird, today i recognized that the gui-flickering is only present when i build in Visual Studio on x86 but not on x64.

I try another driver and will inform you if that was the reason.

Oh cmon, thats sucks ._. works perfectly fine with 365.19…

And i spent hours of debugging xD