Mysterious clear

Greetings,

I have a situation where I clear a VkImage in one render pass with a clear color using vkCmdClearAttachments. However, after all render passes are done the image is black. I opened NVidia Nsight and it tells me that the clear correlates with a vkCmdDraw call in a different VkRenderPass. The render pass has no clear values specified. For tests I made all the loadOp to LOAD and storeOp to STORE to no avail.

Where can this clear come from?

Regards

However, after all render passes are done the image is black.

Is the clear color not black?

For tests I made all the loadOp to LOAD and storeOp to STORE to no avail.

Is the load properly synchronized with the aforementioned clear. And is the clear stored in the first place?

Where can this clear come from?

Maybe nowhere. Black could be just freshly initialized image with no writes yet.

Or well, the vkCmdDraw could be drawing it black for all I know. You haven’t shared much details.