> ## 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.

# SetPipelineState1 (XBOX Series 主机)

> 在命令列表上设置状态对象。

在命令列表上设置状态对象。

## 语法

```cpp theme={null}
void SetPipelineState1(
    ID3D12StateObject  pStateObject
)
```

### 参数

*pStateObject*\
类型：ID3D12StateObject \*

要在命令列表上设置的状态对象。在当前版本中，其类型只能为 [D3D12\_STATE\_OBJECT\_TYPE\_RAYTRACING\_PIPELINE](/reference/graphics/d3d12/enums/d3d12_state_object_type_public)。

### 返回值

类型：void

无。

## 备注

此方法可以从图形或计算命令列表以及捆绑包中调用。

此方法是 [ID3D12GraphicsCommandList::SetPipelineState](/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_setpipelinestate_public) 的替代方法，后者仅为图形和计算着色器定义。一个命令列表上一次只有一个活动管线状态，因此任一调用都会设置当前管线状态。这些调用之间的区别在于，每个调用仅设置特定类型的管线状态。在当前版本中，**SetPipelineState1** 仅用于设置光线跟踪管线状态。

## 要求

**头文件：** d3d12\_xs.h\
**库：** d3d12\_xs.lib\
**支持的平台**：XBOX Series 主机

## 另请参阅

[ID3D12GraphicsCommandList4](/reference/graphics/d3d12_xs/interfaces/ID3D12GraphicsCommandList4/id3d12graphicscommandlist4)


## Related topics

- [SetPipelineStackSize (XBOX Series consoles)](/zh-CN/reference/graphics/d3d12/interfaces/id3d12stateobjectproperties/methods/id3d12stateobjectproperties_setpipelinestacksize_public.md)
- [D3D12_RAYTRACING_PIPELINE_FLAGS (XBOX Series 主机)](/zh-CN/reference/graphics/d3d12/enums/d3d12_raytracing_pipeline_flags_public.md)
- [RSSetShadingRate (XBOX Series 主机)](/zh-CN/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist5/methods/id3d12graphicscommandlist5_rssetshadingrate_public.md)
- [RSSetShadingRateImage (XBOX Series 主机)](/zh-CN/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist5/methods/id3d12graphicscommandlist5_rssetshadingrateimage_public.md)
- [SetPipelineState](/zh-CN/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_setpipelinestate_public.md)
