I wonder whether it is possible to render multiple passes into the same color and depth attachment in Vulkan? I need to do a headless rendering of a huge model that does not fit into the the GPU memory (I'm using Swiftshader that has only 1GB of memory). I'd like to do the following sequence of actions:
- Initialize an empty color attachment and depth buffer
- Setup the shader and graphics pipeline
- Loop over chunks of vertices from my huge model
- Upload the chunk of vertices from the CPU to the GPU
- Render into the color and depth buffers (on "top" of the previous values in the color and depth attachments)
- Repeat next chunk
I'm currently stuck on vkCmdBeginRenderPass() which takes a "clear value". But what if I don't want to clear the buffer. Can I just do clearValues = 0? What else is needed to get the scenario above to work?