Our application use big render targets that are only partially filled. We load them with VK_ATTACHMENT_LOAD_OP_DONT_CARE and manually clear the used regions with a quad.

We are observing a cost proportional to the dimensions of the render target when beginning the render pass (vkCmdBeginRenderPass). So even if we only use a region of 100x100, this costs us more in a render target of 2000x2000 than in one of 1000x1000 (it costs 4x more milliseconds).

This is not happening when using D3D11 or D3D12.

This performance cost is not expected. Things get even worse when using multisample. Are we doing something fundamentally wrong?

I can provide RenderDoc capture if necessary.

Any help on this please?

Hello @jesus.de.santos and welcome to the NVIDIA developer forums!

I am not familiar enough with Vulkan to be able to answer this, but I will try and bring this to the attention of some experts.

Did you double check with the Vulkan spec that there is no caveat on using render targets, that it maybe mentions that they will automatically initialized or cleared on beginning of the render pass? Again, this is me guessing, but maybe it gives you a “line of attack” while waiting for more feedback.


Thanks for your answer. Yes, I double checked everything here: specifications, validation layers and used Nvidia Nsight trying to understand more.

As far as I understand, starting a render pass with VK_ATTACHMENT_LOAD_OP_DONT_CARE shouldn’t take this excessive time.