Graphics Reference
In-Depth Information
Figure 2.34 demonstrates some example resource regions selected within a standard 2D
texture resource.
The 2D texture array resources also select their ranges in the same way that their 1D
resource counterparts do. That is, they select a range of mip-map levels, as well as an ar-
ray element range. This is specified in the D3D11_TEX2D_ARRAY_SRV structure within the
D3D11_SHADER_RES0URCE_VIEW_DESC structure shown in Listing 2.31.
struct D3D11_TEX2D_ARRAY_SRV {
UINT MostDetailedMip;
UINT MipLevels;
UINT FirstArraySlice;
UINT ArraySize;
}
Listing 2.31. The members of the D3D11_TEX2D_ARRAY_SRV structure.
The mip-map level range is selected in the MostDetailedMip and MipLevel parame-
ters, as seen above. In addition, the array element range is selected with the FirstArraySlice
and ArraySize parameters. A few example ranges are shown in Figure 2.35.
Multisample 2D texture resources can also be used with shader resource views. Since
multisampled textures do not contain mip-maps, there is no sub-range of the standard
resource to select. This is reflected in the D3D11_TEX2DMS_SRV structure by its lack of
parameters. However, the multisampled 2D texture array resources do allow the selection
Figure 2.35. The various shader resource view subresource selections available for 2D texture array resources.
Search WWH ::




Custom Search