Graphics Reference
In-Depth Information
Figure 7.2. Parallelizing the API calls required for a rendering operation.
older APIs are geared toward increasing batch sizes. A batch is a group of objects that can
be rendered either together, in the same draw call, or one after another, without other state
changes — all aimed at reducing the number of API calls that need to be executed to render
a frame.
This is clearly a task that could benefit from parallelization—the operations being
performed are already neatly grouped and can be executed independent of one another. The
colored groups could easily be split up and processed by other threads, effectively dividing
the time used to submit the API calls by the number of available processing cores. That is,
if the rendering API allowed the calls to be submitted on multiple threads, which up until
Direct3D 11 they could not be! Such a parallel execution system is shown in Figure 7.2.
This can also be taken a step further, with the concept of using objects to represent a
series of API calls. These objects, which are commonly referred to as display lists or com-
mand lists, could be generated once by recording a set of all of the desired API functions.
Then the list could be executed quickly and efficiently by the driver, with minimal CPU
time required to submit all of the API calls (since they aren't necessary anymore). The list
Search WWH ::




Custom Search