D3D12_CLEAR_VALUE structure (d3d12.h)

Describes a value used to optimize clear operations for a particular resource.

Syntax

typedef struct D3D12_CLEAR_VALUE {
  DXGI_FORMAT Format;
  union {
    FLOAT                     Color[4];
    D3D12_DEPTH_STENCIL_VALUE DepthStencil;
  };
} D3D12_CLEAR_VALUE;

Members

Format

Specifies one member of the DXGI_FORMAT enum.

The format of the commonly cleared color follows the same validation rules as a view/ descriptor creation. In general, the format of the clear color can be any format in the same typeless group that the resource format belongs to.

This Format must match the format of the view used during the clear operation. It indicates whether the Color or the DepthStencil member is valid and how to convert the values for usage with the resource.

Color[4]

Specifies a 4-entry array of float values, determining the RGBA value. The order of RGBA matches the order used with ClearRenderTargetView.

DepthStencil

Specifies one member of D3D12_DEPTH_STENCIL_VALUE. These values match the semantics of Depth and Stencil in ClearDepthStencilView.

Remarks

This structure is optionally passed into the following methods:

Requirements

Requirement Value
Header d3d12.h

See also

CD3DX12_CLEAR_VALUE

Core Structures