ID3D12DebugCommandList::AssertResourceState method (d3d12sdklayers.h)

Checks whether a resource, or subresource, is in a specified state, or not.

Syntax

BOOL AssertResourceState(
  [in] ID3D12Resource *pResource,
       UINT           Subresource,
       UINT           State
);

Parameters

[in] pResource

Type: ID3D12Resource*

Specifies the ID3D12Resource to check.

Subresource

Type: UINT

The index of the subresource to check. This can be set to an index, or D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES.

State

Type: UINT

Specifies the state to check for. This can be one or more D3D12_RESOURCE_STATES flags Or'ed together.

Return value

Type: BOOL

This method returns true if the resource or subresource is in the specified state, false otherwise.

Requirements

Requirement Value
Target Platform Windows
Header d3d12sdklayers.h

See also

ID3D12DebugCommandList