Graphics Reference
In-Depth Information
2
Direct3D 11 Resources
In many cases, discussions of modern real-time rendering techniques tend to revolve around
the programmable pipeline and what can be done with it. The pipeline is indeed a critically
important piece in the real-time rendering puzzle, especially since one of the primary tasks
of the graphics developer is writing shader programs for use in the pipeline. However, the
importance of the memory resources connected to the pipeline is often overlooked in these
discussions. It is just as important to understand what resources are required for a particular
algorithm, where they will be used, and how they will be used.
This chapter will inspect the topic of Direct3D 11 Memory Resources in depth. We
begin by identifying how resources are organized and managed by the Direct3D 11 API
and then consider the two major types of resources—buffers and textures. We will discuss
in detail each subtype of resource, how it is created, how it is used, and how it is released
when no longer needed. The discussion of resource use will also introduce the concept of a
resource view, a type of adapter used to connect a resource to a particular place in the pipeline.
Any discussion about resources must also look at both aspects of their usage. The ap-
plication is concerned with creating, populating, and connecting resources to the pipeline.
However, we must also consider how resources are used inside of the pipeline as well. How
they are declared and used within a programmable shader is just as important of a consider-
ation as properly creating the resources. This topic is discussed in detail to provide a sound
understanding of this usage within shader programs, which will be built upon in Chapters 3-7.
As we will see later in this chapter, it is very important to have a clear understanding
of how a resource will be used before creating it, since its usage domain is predetermined
by its creation input parameters. If incorrectly configured, a resource can have several
negative effects on your applications, ranging from poor performance all the way to a com-
plete inability to execute the pipeline due to errors. This makes resources a very important
topic indeed!
27
Search WWH ::




Custom Search