ID3D12GraphicsCommandList::ClearState method (d3d12.h)

Resets the state of a direct command list back to the state it was in when the command list was created.

Syntax

void ClearState(
  [in, optional] ID3D12PipelineState *pPipelineState
);

Parameters

[in, optional] pPipelineState

Type: ID3D12PipelineState*

A pointer to the ID3D12PipelineState object that contains the initial pipeline state for the command list.

Return value

None

Remarks

It is invalid to call ClearState on a bundle. If an app calls ClearState on a bundle, the call to Close will return E_FAIL.

When ClearState is called, all currently bound resources are unbound. The primitive topology is set to D3D_PRIMITIVE_TOPOLOGY_UNDEFINED. Viewports, scissor rectangles, stencil reference value, and the blend factor are set to empty values (all zeros). Predication is disabled.

The app-provided pipeline state object becomes bound as the currently set pipeline state object.

Requirements

Requirement Value
Target Platform Windows
Header d3d12.h
Library D3D12.lib
DLL D3D12.dll

See also

ID3D12GraphicsCommandList