Graphics Reference
In-Depth Information
can also be reused from frame to frame, as long as the data in them doesn't change. These
types of command list objects have been implemented in other rendering systems (such as
OpenGL or the XBOX 360 variant of Direct3D) but have not been available in D3D9 or
D3D10.
In summary, we can say that the overall desire regarding draw submission sequences
is to increase the scalability of the rendering software. If the software can correctly par-
allelize its workload, then we are able to reduce the time required to perform the CPU
work for a given frame, and automatically become even more efficient as the number of
CPU cores increases. This includes both spreading the API calls over multiple threads,
and reducing the number of serialized API calls with command lists. If we can reduce the
potential for the CPU to be a bottleneck in the overall rendering system, we increase the
likelihood that we can use the GPU to the fullest of its abilities.
7.3 Direct3D 11 Threading Model
Now that we have several strong motivations for adding multithreading to a rendering
system, we are ready to discuss the threading model provided in Direct3D 11. As described
earlier, the D3D9 and D3D10 device interfaces could be created with a flag to specify that
the device would be used in a multithreaded environment. If this flag was not used, the
devices were considered to be thread-unsafe and therefore should only be accessed from a
single thread. When devices are created with the multithreading flag, they are created with
coarse synchronization primitives to ensure that the device methods are only used by one
thread at a time. This is referred to as thread-safe, which means that multiple threads can
call the same method of a device, while synchronization ensures that there is no interfer-
ence between the calls.
Direct3D 11 was designed with multithreading as one of the primary requirements.
Devices, in comparison to how they were handled in D3D9/10, have been split into two
different interfaces: the device and the device context. We will discuss each of these inter-
faces, and how they have been implemented for multithreading, in the following sections.
7.3.1 The Device
Before Direct3D 11, the responsibilities of the device interface had remained more or less
unchanged for the most recent generations of Direct3D. It represented the entire GPU, in-
cluding all draw submission sequences, as well as all resource creation activities. This made
the device the primary interface that was used in Direct3D. Now, Direct3D 11 has taken
the device and split up its responsibilities, leaving only a subset of its original functionality
Search WWH ::




Custom Search