Graphics Reference
In-Depth Information
The Computation
Pipeline
5.1 Introduction
Throughout the topic up to this point, we have seen how the new features of Direct3D 11
can be used to perform extremely flexible rendering operations. However, there is yet an-
other pipeline stage available for performing flexible computations that can be applied to
a wider range of applications. This allows the GPU to be used in such diverse applications
as ray tracing and physical simulations, and in some cases, it can even be used for artifi-
cial intelligence calculations. Of course, this pipeline stage is the compute shader stage,
and it represents the implementation of a technology often referred to as DirectCompute.
DirectCompute provides the first steps to adding a general-purpose processing paradigm
to Direct3D, and supplies a more natural and flexible processing environment to the devel-
oper to harness the power of the GPU for non-rendering algorithms.
This chapter will explore this new computation pipeline, starting with the architec-
tural details of how the compute shader pipeline stage operates. This includes details about
its new threading model, memory model, synchronization system, and addressing scheme.
With a clear understanding of how the compute shader functions, we will then turn our
attention to how we can use it for various different computational tasks. We attempt to pro-
vide general guidelines to follow when designing an algorithm for DirectCompute. Since
several thousand threads can be active on the GPU simultaneously, it is important to have
a solid understanding of how to harness all of these threads to fully use the power of the
GPU.
287
Search WWH ::




Custom Search