D3D12_CLEAR_VALUE structure

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

Specifies a 4-entry array of float values (each value in the range 0.0 to 1.0), 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

   
Header d3d12.h

See Also

CD3DX12_CLEAR_VALUE

Core Structures