ID3D12Device5::CreateStateObject method (d3d12.h)

Creates an ID3D12StateObject.

Syntax

HRESULT CreateStateObject(
  [in]  const D3D12_STATE_OBJECT_DESC *pDesc,
        REFIID                        riid,
  [out] void                          **ppStateObject
);

Parameters

[in] pDesc

The description of the state object to create.

riid

The GUID of the interface to create. Use __uuidof(ID3D12StateObject).

[out] ppStateObject

The returned state object.

Return value

Returns S_OK if successful; otherwise, returns one of the following values:

  • E_INVALIDARG if one of the input parameters is invalid.
  • E_OUTOFMEMORY if sufficient memory is not available to create the handle.
  • Possibly other error codes that are described in the Direct3D 12 Return Codes topic.

Requirements

Requirement Value
Minimum supported client Windows 10, version 1809 [desktop apps only]
Minimum supported server Windows Server 2016 [desktop apps only]
Target Platform Windows
Header d3d12.h
Library D3D12.lib
DLL D3D12.dll

See also

ID3D12Device5