An earlier change made each Command List have its own Command Allocator in order to make Command List management easier. This turns out to have drawbacks:
* It's too memory intensive - CAs retain memory space they pre-allocated
* Resetting a CA is a heavier CPU operation which should be used more sparsely, otherwise we're wasting CPU cycles mid-frame recording
* On draw-heavy scenes (seen especially in RenderPerfTest) the CAs need to freshly allocate memory which takes extra time and makes first frames much slower until their memory consumption stabilizes
D3D12 runtime also allows to use one Command Allocator with multiple Command Lists, as long as only one Command List is actively recording commands. We can rotate Command Lists without needing to rotate Command Allocators.
We should revert to using one Command Allocator per frame and only change them after a SwapChain Present is recorded on a Command Queue.
* It's too memory intensive - CAs retain memory space they pre-allocated
* Resetting a CA is a heavier CPU operation which should be used more sparsely, otherwise we're wasting CPU cycles mid-frame recording
* On draw-heavy scenes (seen especially in RenderPerfTest) the CAs need to freshly allocate memory which takes extra time and makes first frames much slower until their memory consumption stabilizes
D3D12 runtime also allows to use one Command Allocator with multiple Command Lists, as long as only one Command List is actively recording commands. We can rotate Command Lists without needing to rotate Command Allocators.
We should revert to using one Command Allocator per frame and only change them after a SwapChain Present is recorded on a Command Queue.