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