Graphics Reference
In-Depth Information
bound to some or all of the programmable shader stages for use in the shader programs.
These usages will be discussed in more detail later in this chapter, but in general it must
be ensured that the proper bind flag is set for the desired pipeline connection points. An
overview of these binding points, and where they are located on the pipeline, is shown
Figure 2.2.
Miscellaneous Flags
The final common property that we will look at is the miscellaneous flags. This group of
flags encapsulates most of the special-case properties that a resource can use. Some of
these flags allow for resources to be used in non-traditional situations, such as interoperat-
ing with GDI drawing or sharing a resource between multiple ID3D11 Device instances.
The available flags are shown in Listing 2.4.
enum D3D11_RES0URCE_MISC_FLAG {
D3D11_RESOURCE_MISC_GENERATE_MIPS,
D3D11_RESOURCE_MISC_SHARED,
D3D11_RESOURCE_MISC_TEXTURECUBE,
D3D11_RESOURCE_MISC_DRAWINDIRECT_ARGS,
D3D11_RESOURCE_MISC_BUFFER_ALO0W_RAW_VIEWS,
D3D11_RESOURCE_MISC_BUFFER_STRUCTURED,
D3D11_RESOURCE_MISC_RES0URCE_CLAMP,
D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX,
D3D11_RESOURCE_MISC_GDI_C0MPATIBLE
}
Listing 2.4. The D3D11_RESOUR_MISC_FLAG enumeration.
Due to the miscellaneous nature of the flags, some of them will be discussed in more
detail throughout the remainder of the chapter when the appropriate content has been intro-
duced. However, we will briefly discuss some of these flags here, due to their more general
nature. The D3D11_RESOURCE_MISC_SHARED flag indicates that the resource can be
shared among multiple ID3DllDevice instances. This is used only in advanced applica-
tions and is not further discussed in the remainder of this topic. Similarly, the D3D11_
RESOURCE_MISC_SHARED_KEYEDMUTEX flag indicates that a resource will be
used by multiple devices, but that it also supports a mutex system for sharing control of the
resource. This functionality is also not discussed in the remainder of this topic. And finally,
we have the D3D11_RESOURCE_MISC_GDI_COMPATIBLE flag, which indicates that
a resource can be used interchangeably with GDI. This functionality is used in some of the
demo programs to implement text rendering, but it is not further described in this topic.
Search WWH ::




Custom Search