-
Notifications
You must be signed in to change notification settings - Fork 177
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
There's a particular usage pattern for dynamically recorded command buffers which DX12 applications make use of DX12's ability to free-associate command buffers with command allocators, which is not how things naturally work in Vulkan.
Whilst this might not be the ideal method for managing command buffers in all cases, it works, and is natural for anyone porting D3D12 content.
After discussion in the Vulkan WG, we agreed that the following advice is the right way to achieve the same in Vulkan, with no expected perf implications vs DX12:
- Allocate command pools with VK_COMMAND_POOL_CREATE_TRANSIENT_BIT
- Treat VkCommandPool objects the same as ID3D12CommandAllocator objects
- I.e. they are externally synchronized command allocators
- Don't pre-allocate command buffers
- Allocate command buffers when you want to begin recording, then begin them
- When the command buffer is no longer in use, free the command buffer
- Ideally along with all others associated with the same pool
It would be useful to turn this porting advice into a section of the Vulkan-Guide, possibly alongside other porting advice.
Andreyogld3d, obhi-d, YukinoHayakawa and ghishadow
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation