> ## 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](/zh-TW/reference/graphics/d3d12/interfaces/id3d12rootsignature/id3d12rootsignature_public) 物件的指標。

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

描述計算著色器的 [D3D12\_SHADER\_BYTECODE](/zh-TW/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](/zh-TW/reference/graphics/d3d12/structs/d3d12_cached_pipeline_state_public) 結構表示。pCachedBlob 與 CachedBlobSizeInBytes 可以分別設為 NULL 與 0。

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

[D3D12\_PIPELINE\_STATE\_FLAGS](/zh-TW/reference/graphics/d3d12_xs/enums/d3d12_pipeline_state_flags_xs) 列舉常數，例如用於「工具偵錯」的常數。

## 備註

此結構由 [CreateComputePipelineState](/zh-TW/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-TW/reference/graphics/d3d12/interfaces/id3d12device/methods/id3d12device_createcomputepipelinestate_public.md)
- [LoadComputePipeline](/zh-TW/reference/graphics/d3d12/interfaces/id3d12pipelinelibrary/methods/id3d12pipelinelibrary_loadcomputepipeline_public.md)
- [LoadPipeline](/zh-TW/reference/graphics/d3d12/interfaces/id3d12pipelinelibrary1/methods/id3d12pipelinelibrary1_loadpipeline_public.md)
- [D3D12_SHADER_BYTECODE](/zh-TW/reference/graphics/d3d12/structs/d3d12_shader_bytecode_public.md)
- [D3D12_CACHED_PIPELINE_STATE](/zh-TW/reference/graphics/d3d12/structs/d3d12_cached_pipeline_state_public.md)
