> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# StorePipeline

> 将输入 PSO 添加到具有相应名称的内部数据库中。

将输入 PSO 添加到具有相应名称的内部数据库中。

## 语法

```cpp theme={null}
HRESULT StorePipeline(
    LPCWSTR pName,
    ID3D12PipelineState  pPipeline
)
```

### 参数

*pName \[in, optional]*\
类型：LPCWSTR

为库指定唯一名称。不支持覆盖。

*pPipeline \[in]*\
类型：ID3D12PipelineState \*

指定要添加的 [ID3D12PipelineState](/reference/graphics/d3d12_xs/interfaces/ID3D12PipelineState/id3d12pipelinestate_xs)。

### 返回值

类型：HRESULT

此方法返回一个 HRESULT 成功或错误代码，包括 E\_INVALIDARG（如果名称已存在）、E\_OUTOFMEMORY（如果无法在库中分配存储）。

## 备注

请参阅 [CreatePipelineLibrary](/reference/graphics/d3d12/interfaces/id3d12device1/methods/id3d12device1_createpipelinelibrary_public) 的备注和示例。

## 要求

**头文件：** d3d12\_xs.h 或 d3d12\_x.h\
**库：** d3d12\_xs.lib 或 d3d12\_x.lib\
**支持的平台**：XBOX Series 主机和 XBOX One 系列

## 另请参阅

[ID3D12PipelineLibrary](/reference/graphics/d3d12/interfaces/id3d12pipelinelibrary/id3d12pipelinelibrary_public)
