Vulkan swap chain, can we reuse the same render pass for every frame?


This Content is from Stack Overflow. Question asked by Sébastien Bémelmans

My question is in the title.

The swap chain need multiple images and I understand why, so it seems logical to have the same image views amount because they are like a pointer to these. And finally, I understand why it needs multiple framebuffers, because you attach image views to these.

But, the framebuffer needs a render pass handle. But there is no direct link on an image or an image view in a render pass, it only describe with what the rendering will be done.

Then a graphics pipeline only needs a render pass handle. And finally the vkCmdBeginRenderPass() function specifies separately which framebuffer and which render pass it will use.

So why sometimes I saw multiple render passes within a swap chain ? It forces to have a graphics pipeline for each frame which are totally the same.


This question is not yet answered, be the first one who answer using the comment. Later the confirmed answer will be published as the solution.

This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?