When we want to use Vulkan in a multithreaded application, we must keep in mind several rules. First, we shouldn't modify the same object on multiple threads. For example, we cannot allocate command buffers from a single pool or we cannot update a descriptor set from multiple threads.
We can access resources from multiple threads only if the access is read only or if we reference separate resources. But, as it may be hard to track which resources were created on which thread, in general, resource creation and modification should be performed only on a single main thread (which we can also call the rendering thread).
The most common scenario of utilizing multithreading in Vulkan is to concurrently record command buffers. This ...