Advertisement

Reuse commands in DirectX 12

Started by July 04, 2017 11:32 AM
1 comment, last by Hodgman 7 years, 5 months ago

Hi. It is a little bit unclear for me. I have in hands demos from Intel and they create reset and put commands to the command lists at any frame. If my commands are going to be always the same for the whole program and in the same order, how can I reuse for real the commands. How to create the command list, put the commands inside and just use it in each frame, not issuing all the commands again and again? I need to know why all the demos are doing it this way(re-issuing the command to the command list)? Is it required to be that way by the designers of the API? Do I have to create a bundle of the size of the whole command list if I want pre-compilation?

You can just reuse the command list instead of resetting it (make sure you also don't reset the allocator).

Most games don't do this because the specific rendering commands and the order that they should be processed in does tend to change every frame. If you've got small bits of re-use (e.g. one object / under 10 draws), then bundles are ok. If you've got massive bits of reuse, then record a whole command buffer and keep it around.

This topic is closed to new replies.

Advertisement