Command List

A command list is a sequence of GPU commands that can be recorded and played back. A command list may improve performance by reducing the amount of overhead generated by the runtime.

Use a command list in the following scenarios:

  • Within a single frame, render part of the scene on one thread while recording another part of the scene on a second thread. At the end of the frame, play back the recorded command list on the first thread. Use this approach to scale complex rendering tasks across multiple threads or cores.
  • Pre-record a command list before you need to render it (for example, while a level is loading) and efficiently play it back later in your scene. This optimization works well when you need to render something often.

A command list is immutable and is designed to be recorded and played back during a single execution of an application. A command list is not designed to be pre-recorded ahead of game execution and loaded from your media as there is no way to persist the list.

A command list must be recorded by a deferred context, but it can only be played back on an immediate context. Deferred contexts can generate command lists concurrently.

Immediate and Deferred Rendering

MultiThreading