I have some questions about the GPU usage of Queues / Queue families, command buffer / pool.
I am reading the Book:
Vulkan Programming Guide: The Official Guide to Learning Vulkan. What I don't get is how the usage of the GPU is based on the listed items:
How I understand how it works: There are Queue families (my hardware has 3 families) which can handle different things. There I should use the family with the minimum support with which my program is able to work. So in case not doing graphics, I should use a family without graphics support. That is fine! Using the same resources between queues within the same family has no negative effect on performance, except synchronization.
Question 1: Does each Queue family has the full excess of the GPU? Meaning when using just one Queue, does the GPU can work with 100% usage?
Question 2: Does it make sense to use 2 Queues from different families (graphics and transfer) in case the task is to render a scenario (queue graphics) and transfer the finished image to the CPU to save it as a file (queue transfer)? I am asking that because my graphics queue family also has a transfer bit. So maybe it is better to use just this one graphics queue.
Question 3: The book says that the command buffers belong to a command pool. What is the difference when using 1 pool with several buffers instead of using several pools with each having 1 buffer? Is it only because of the barriers? Or do I have performance issues or access problems when using several pools? It would be nice if someone could write a bit about the pools and buffers (I miss that in the book).
Question 4: I don't think there is a general answer for this question, but maybe some rule of thumb? When using Vulkan, multi-threading should be used, to not block the CPU. As far as I understood, I would use one thread per command pool, because the barriers (smallest synchronization tools) work per pool. Does that make sense? Or is it better to use one thread per Queue? Or maybe per Queue family? I also thought about having one thread per queue, which is controlling one thread per command pool, to keep the synchronization simple (each queue thread is like the master of each command pool thread). But here I am confused because the command pool belongs to a queue family (not a queue itself). So two queues from the same family could use the same command pool.
Please correct me if something I wrote is wrong. I am new to Vulkan but comming from OpenGL / DirectX 11. I also would like to receive some links to better explanations regarding the Queues and command buffer / pools hierarchy and maybe something about the threading for Vulkan applications. When answering the questions, please give an example scenario if possible (to see which difference it makes). Thanks a lot!