ID3D12Device2::CreatePipelineState method (d3d12.h)

Creates a pipeline state object from a pipeline state stream description.

Syntax

HRESULT CreatePipelineState(
        const D3D12_PIPELINE_STATE_STREAM_DESC *pDesc,
        REFIID                                 riid,
  [out] void                                   **ppPipelineState
);

Parameters

pDesc

Type: const D3D12_PIPELINE_STATE_STREAM_DESC*

The address of a D3D12_PIPELINE_STATE_STREAM_DESC structure that describes the pipeline state.

riid

Type: REFIID

The globally unique identifier (GUID) for the pipeline state interface (ID3D12PipelineState).

The REFIID, or GUID, of the interface to the pipeline state can be obtained by using the __uuidof() macro. For example, __uuidof(ID3D12PipelineState) will get the GUID of the interface to a pipeline state.

[out] ppPipelineState

Type: void**

SAL: COM_Outptr

A pointer to a memory block that receives a pointer to the ID3D12PipelineState interface for the pipeline state object.

The pipeline state object is an immutable state object. It contains no methods.

Return value

Type: HRESULT

This method returns E_OUTOFMEMORY if there is insufficient memory to create the pipeline state object. See Direct3D 12 Return Codes for other possible return values.

Remarks

This function takes the pipeline description as a D3D12_PIPELINE_STATE_STREAM_DESC and combines the functionality of the ID3D12Device::CreateGraphicsPipelineState and ID3D12Device::CreateComputePipelineState functions, which take their pipeline description as the less-flexible D3D12_GRAPHICS_PIPELINE_STATE_DESC and D3D12_COMPUTE_PIPELINE_STATE_DESC structs, respectively.

Requirements

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

See also

See D3D12_PIPELINE_STATE_STREAM_DESC for a description of the layout and behavior of a streaming pipeline desc.

ID3D12Device2