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

# GetDescriptorX (XBOX One 系列)

> GetDescriptorX (XBOX One 系列主機) — 取得此 ID3D12PipelineState 的描述元，以搭配 ID3D12GraphicsCommandList::ExecuteIndirect 使用。

取得此 **ID3D12PipelineState** 的描述元，以搭配 [ExecuteIndirect](https://msdn.microsoft.com/library/windows/desktop/Dn903884\(v=VS.85\).aspx) 使用。

## 語法

```cpp theme={null}
void GetDescriptorX(  
         D3D12XBOX_DESCRIPTOR_PIPELINE_STATE* pDescriptor  
)  
```

### 參數

*pDescriptor*   \_Out\_\
類型：[D3D12XBOX\_DESCRIPTOR\_PIPELINE\_STATE\*](/zh-TW/reference/graphics/d3d12_x/structs/d3d12xbox_descriptor_pipeline_state)

描述元，以指向 [D3D12XBOX\_DESCRIPTOR\_PIPELINE\_STATE](/zh-TW/reference/graphics/d3d12_x/structs/d3d12xbox_descriptor_pipeline_state) 結構的指標表示。

### 傳回值

類型：void

## 備註

此方法可讓您查詢管線狀態描述元，以供 [ExecuteIndirect](https://learn.microsoft.com/en-us/windows/win32/api/d3d12/nf-d3d12-id3d12graphicscommandlist-executeindirect) 使用。描述元一律必須透過 **GetDescriptorX** 查詢，且必須在建立對應的管線狀態物件之後查詢；無法在管線狀態物件的存留期之間以靜態方式保存描述元。

**ExecuteIndirect** 的實作會施加下列限制：

* 必須串流整個引數緩衝區，包括因步幅而略過的任何 DWORD。因此，[D3D12\_COMMAND\_SIGNATURE\_DESC](https://learn.microsoft.com/en-us/windows/win32/api/d3d12/ns-d3d12-d3d12_command_signature_desc) 結構的 **ByteStride** 成員限制為 256。
* 命令處理器的引數空間有限。因此，**D3D12\_COMMAND\_SIGNATURE\_DESC** 結構的 **NumArgumentDescs** 成員限制為 16。
* 在 [D3D12\_INDIRECT\_ARGUMENT\_DESC](https://learn.microsoft.com/en-us/windows/desktop/api/d3d12/ns-d3d12-d3d12_indirect_argument_desc) 結構內的 **Constant** 結構中，**Constant.Num32BitValuesToSet** 不能是 16 或更大的值。

## 需求

**標頭：** d3d12\_x.h

**程式庫：** d3d12\_x.lib

**支援的平台：** XBOX One 系列

## 另請參閱

[ID3D12PipelineState](/zh-TW/reference/graphics/d3d12_x/interfaces/id3d12pipelinestate/id3d12pipelinestate)


## Related topics

- [GetDescriptorHandleIncrementSize](/zh-CN/reference/graphics/d3d12/interfaces/id3d12device/methods/id3d12device_getdescriptorhandleincrementsize_public.md)
- [GetCPUDescriptorHandleForHeapStart](/zh-CN/reference/graphics/d3d12/interfaces/id3d12descriptorheap/methods/id3d12descriptorheap_getcpudescriptorhandleforheapstart_public.md)
- [GetGPUDescriptorHandleForHeapStart](/zh-CN/reference/graphics/d3d12/interfaces/id3d12descriptorheap/methods/id3d12descriptorheap_getgpudescriptorhandleforheapstart_public.md)
- [ID3D12DescriptorHeap::GetDesc](/zh-CN/reference/graphics/d3d12/interfaces/id3d12descriptorheap/methods/id3d12descriptorheap_getdesc_public.md)
- [CopyDescriptors](/zh-CN/reference/graphics/d3d12/interfaces/id3d12device/methods/id3d12device_copydescriptors_public.md)
