Renderpass and dynamic rendering

Hello,
If I use renderpass, I can choose different set of color attachments for each subpass.

But in dynamic rendering, inside buildCommandBuffer function, there should be only one set of color attachments for vkCmdBeginRendering ~ vkCmdEndRendering region

Then, if I want two local reads parts, and for each part, I want to apply different color attachments for each, how can I handle this issue?

Actually I solved this issue, by creating two successive vkCmdBeginRendering ~ vkCmdEndRendering region

But, can I solve this issue with only one vkCmdBeginRendering ~ vkCmdEndRendering region ?

Thank you

The whole point of dynamic rendering is to not have subpasses. If you want to change render targets, you do a different begin/end render operation.

1 Like

Hello, thank you again, Alfonse

May I ask one more question?

Then if I use multiple successive begin ~ end region
to do above,
are there no performance issues due to this?

No, performance is the same. At least for traditional desktop GPUs. If you used input attachments with renderpasses (aka “pixel local storage”), then doing multiple passes this way might be slower on tile-based renderers (mobile). In that case you can use the dynamic rendering local read extension, which gives you pixel local storage support for dynamic rendering.

1 Like

Oh, thank you, Sascha
Now I have much better understanding about these
Thank you for saving my time
See you, Sascha