Graphics Reference
In-Depth Information
Figure 2.39. The unordered access view subresource selection for 2D texture array resources.
The array range selection is performed in the familiar manner, with the First
ArraySlice marking the beginning of the range, and the Ar raySize specifying how many
slices to use. For clarification, this subresource selection is demonstrated in Figure 2.39.
Texture2D render target view. As we have seen in the "Using 2D Textures" section, one
of the primary uses for a 2D texture is as a render target. Four different configurations are
allowed for these resources to be used with a render target view, depending on which op-
tions the texture resource was created with. A standard 2D texture without multisampling
or array elements can specify a single mip-map level to be exposed with the render target
view. This is done through the D3D11_TEX2D_RTV structure in the D3D11_RENDER_TARGET_
VIEW_DESC structure, as shown in Listing 2.37.
struct D3D11_TEX2D_RTV {
UINT MipSlice;
}
Listing 2.37. The members of the D3D11_TEX2D_RTV structure.
The 2D texture array resources provide the same type of subresource options that the
unordered access view does, allowing a single mip-map level to be specified over a selectable
range within the texture array elements. This is done through the D3D11_TEX2D_ARRAY_RTV
structure within the D3D11_RENDER_TARGET_VIEW_DESC structure, as shown in Listing 2.38.
Search WWH ::




Custom Search