ID3D12PipelineLibrary1::LoadPipeline method (d3d12.h)

Retrieves the requested PSO from the library. The pipeline stream description is matched against the library database, and remembered in order to prevent duplication of PSO contents.

Syntax

HRESULT LoadPipeline(
  [in]  LPCWSTR                                pName,
  [in]  const D3D12_PIPELINE_STATE_STREAM_DESC *pDesc,
        REFIID                                 riid,
  [out] void                                   **ppPipelineState
);

Parameters

[in] pName

Type: LPCWSTR

SAL: In

The unique name of the PSO.

[in] pDesc

Type: const D3D12_PIPELINE_STATE_STREAM_DESC*

SAL: In

Describes the required PSO using a D3D12_PIPELINE_STATE_STREAM_DESC structure. This description is matched against the library database, and stored in order to prevent duplication of PSO contents.

riid

Type: REFIID

Specifies a REFIID for the ID3D12PipelineState object.

Your app should typically set this argument and the following argument, ppPipelineState, by using the macro IID_PPV_ARGS(&PSO1), where PSO1 is the name of the object.

[out] ppPipelineState

Type: void**

SAL: COM_Outptr

Specifies the pointer that will reference the PSO after the function successfully returns.

Return value

Type: HRESULT

This method returns an HRESULT success or error code, which can include E_INVALIDARG if the name doesn't exist or the stream description doesn't match the data in the library, and E_OUTOFMEMORY if the function is unable to allocate the resulting PSO.

Remarks

This function takes the pipeline description as a D3D12_PIPELINE_STATE_STREAM_DESC and is a replacement for the ID3D12PipelineLibrary::LoadGraphicsPipeline and ID3D12PipelineLibrary::LoadComputePipeline 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.

ID3D12PipelineLibrary1