KielanT said:
or do I need a separate command list for mesh creation and then add it to the main command list? or is there a better way?
Ideally you want to control everything the GPU should do every frame with persistent command lists, meaning they stay on GPU and don't need to be regenerated on CPU each frame.
The advantage is, contrary to higher level APIs where we many had draw calls causing a lot of CPU - GPU communication, we now only have to say ‘execute this command list which you already have in VRAM’.
But not every task has to be repeated each frame. To upload meshes or textures for example, we don't need a persistent command buffer. We need it only once, so it's fine to generate it on an the fly, executing it and then throwing it away.
The same works for rendering as well ofc., and it's not necessarily inefficient.
Engines which do this a lot, can usually benefit from multi threaded command buffer generation, for example.
While engines which do mostly GPU driven rendering won't cause a CPU load at all, beside things like streaming.
So it may depend on which of those two options you aim for.
GPU driven surely is the higher goal, but it's also harder to do, considering you'll need to implement things like frustum and occlusion culling entirely on GPU.