Multi-threaded rendering against team pools

Nicole Bolas :

After all, the ability to create command buffers at the same time is one of Vulkan's selling points.

Speculations (5.1 command pools) (allocation):

Command pools are synchronized across applications, which means that the command pool should not be used simultaneously in multiple threads. This includes the use of write commands in any command buffers allocated from the pool , as well as operations that allocate, free, and reset command buffers or the pool itself.

Doesn't that kill the whole purpose of instruction pools when it comes to recording in parallel? If you are going to record in parallel, then you better not have a separate pool for each stream, right?

I would understand that if you previously wrote command buffers distributed from one pool (in one thread) and then executed them in parallel. This has the advantage of amortizing the cost of creating resources, as well as parallel execution. However, concurrent writes and instruction pools do not seem to fit very well.

I personally don’t know why you didn’t just pre-record everything. So why do you need to build command buffers in parallel? And would you really need to use one pool per thread?

+4
source share
2 answers

If you are going to record in parallel, then you better not have a separate pool for each stream, right?

, " , ". , , .

, , . , . VkDescriptorPoolCreateInfo , , , . .

, VkCommandPoolCreateInfo ... . , , . , reset . . . , .

: , , . : .

, malloc/free. , , vkCmd* , . . . reset , - , .

. , ( ) .

, .

.

, - , , " 2-N", 1 ", . , , .

, , . , .

, , , . , , CB , , , () . , , . , .

, . CB , . , , , . CB; , , , .

, , . malloc/free. CB , , CB ( - vkCmd*) , - .

, CB.

+6

, , ?

. .

, , ( ), .

. ( ) , ( ).

, . , ?

( , ). - ( CmBs, - , , 80% ).
"", Vulkan , ( ).

+1

All Articles