I have several meshes that use several pipelines and that can be turned on or off using UI commands.
Right now, I have the pipeline binding, the render-pass creation, the buffer binding and the draw commands of all the meshes in the same command group.
I re-create the commands when the user switch on or off a mesh.
I tried to split the commands in several command buffers, using several command groups when submitting the commands.
The validation layer don’t like that, nor vulkan itself. It says that draw commands (CmdDrawIndexed), the pipeline binding and the render pass have to be in the same command group.
My approach is not the right approach. Any advice?
And what about culling. the command group has to be reset and repopulated each frame?