D3D10_DEPTH_STENCIL_VIEW_DESC structure (d3d10.h)

Specifies the subresource(s) from a texture that are accessible using a depth-stencil view.

Syntax

typedef struct D3D10_DEPTH_STENCIL_VIEW_DESC {
  DXGI_FORMAT         Format;
  D3D10_DSV_DIMENSION ViewDimension;
  union {
    D3D10_TEX1D_DSV         Texture1D;
    D3D10_TEX1D_ARRAY_DSV   Texture1DArray;
    D3D10_TEX2D_DSV         Texture2D;
    D3D10_TEX2D_ARRAY_DSV   Texture2DArray;
    D3D10_TEX2DMS_DSV       Texture2DMS;
    D3D10_TEX2DMS_ARRAY_DSV Texture2DMSArray;
  };
} D3D10_DEPTH_STENCIL_VIEW_DESC;

Members

Format

Type: DXGI_FORMAT

Resource data format (see DXGI_FORMAT). See remarks for allowable formats.

ViewDimension

Type: D3D10_DSV_DIMENSION

Type of resource (see D3D10_DSV_DIMENSION). Specifies how a depth-stencil resource will be accessed; the value is stored in the union in this structure.

Texture1D

Type: D3D10_TEX1D_DSV

Specifies a 1D texture subresource (see D3D10_TEX1D_DSV).

Texture1DArray

Type: D3D10_TEX1D_ARRAY_DSV

Specifies an array of 1D texture subresources (see D3D10_TEX1D_ARRAY_DSV).

Texture2D

Type: D3D10_TEX2D_DSV

Specifies a 2D texture subresource (see D3D10_TEX2D_DSV).

Texture2DArray

Type: D3D10_TEX2D_ARRAY_DSV

Specifies an array of 2D texture subresources (see D3D10_TEX2D_ARRAY_DSV).

Texture2DMS

Type: D3D10_TEX2DMS_DSV

Specifies a multisampled 2D texture contains a single subresource (see D3D10_TEX2DMS_DSV).

Texture2DMSArray

Type: D3D10_TEX2DMS_ARRAY_DSV

Specifies a multisampled 2D texture contains a single subresource per texture (see D3D10_TEX2DMS_ARRAY_DSV).

Remarks

These are valid formats for a depth-stencil view:

  • DXGI_FORMAT_D16_UNORM
  • DXGI_FORMAT_D24_UNORM_S8_UINT
  • DXGI_FORMAT_D32_FLOAT
  • DXGI_FORMAT_D32_FLOAT_S8X24_UINT
  • DXGI_FORMAT_UNKNOWN
A depth-stencil view cannot use a typeless format. If the format chosen is DXGI_FORMAT_UNKNOWN, then the format of the parent resource is used.

A depth-stencil-view description is needed when calling ID3D10Device::CreateDepthStencilView.

Requirements

Requirement Value
Header d3d10.h

See also

Resource Structures