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

# D3D12_COMPUTE_PIPELINE_STATE_DESC

> 描述计算管道状态对象。

描述计算管道状态对象。

## 语法

```cpp theme={null}
typedef struct D3D12_COMPUTE_PIPELINE_STATE_DESC
{
    ID3D12RootSignature  pRootSignature;
    D3D12_SHADER_BYTECODE CS;
    UINT NodeMask;
    D3D12_CACHED_PIPELINE_STATE CachedPSO;
    D3D12_PIPELINE_STATE_FLAGS Flags;
} D3D12_COMPUTE_PIPELINE_STATE_DESC
```

### 成员

*pRootSignature*\
类型：ID3D12RootSignature \*

指向 [ID3D12RootSignature](/reference/graphics/d3d12/interfaces/id3d12rootsignature/id3d12rootsignature_public) 对象的指针。

*CS*\
类型：D3D12\_SHADER\_BYTECODE

描述计算着色器的 [D3D12\_SHADER\_BYTECODE](/reference/graphics/d3d12/structs/d3d12_shader_bytecode_public) 结构。

*NodeMask*\
类型：UINT

对于单 GPU 操作，将此设置为零。如果有多个 GPU 节点，请设置多个位以标识计算管道状态适用的节点（设备的物理适配器）。
掩码中的每个位对应一个节点。
请参阅[多适配器系统](https://learn.microsoft.com/en-us/windows/win32/direct3d12/multi-engine)。

*CachedPSO*\
类型：D3D12\_CACHED\_PIPELINE\_STATE

缓存的管道状态对象，采用 [D3D12\_CACHED\_PIPELINE\_STATE](/reference/graphics/d3d12/structs/d3d12_cached_pipeline_state_public) 结构。pCachedBlob 和 CachedBlobSizeInBytes 可以分别设置为 NULL 和 0。

*Flags*\
类型：D3D12\_PIPELINE\_STATE\_FLAGS

[D3D12\_PIPELINE\_STATE\_FLAGS](/reference/graphics/d3d12_xs/enums/d3d12_pipeline_state_flags_xs) 枚举常量，例如用于“工具调试”。

## 备注

此结构由 [CreateComputePipelineState](/reference/graphics/d3d12/interfaces/id3d12device/methods/id3d12device_createcomputepipelinestate_public) 使用。

## 要求

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

## 另请参阅

[核心结构](https://learn.microsoft.com/en-us/windows/win32/direct3d12/direct3d-12-structures)


## Related topics

- [CreateComputePipelineState](/zh-CN/reference/graphics/d3d12/interfaces/id3d12device/methods/id3d12device_createcomputepipelinestate_public.md)
- [LoadComputePipeline](/zh-CN/reference/graphics/d3d12/interfaces/id3d12pipelinelibrary/methods/id3d12pipelinelibrary_loadcomputepipeline_public.md)
- [LoadPipeline](/zh-CN/reference/graphics/d3d12/interfaces/id3d12pipelinelibrary1/methods/id3d12pipelinelibrary1_loadpipeline_public.md)
- [D3D12_SHADER_BYTECODE](/zh-CN/reference/graphics/d3d12/structs/d3d12_shader_bytecode_public.md)
- [D3D12_CACHED_PIPELINE_STATE](/zh-CN/reference/graphics/d3d12/structs/d3d12_cached_pipeline_state_public.md)
