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

# ID3D12GraphicsCommandList2::ResetX (XBOX One 系列)

> ID3D12GraphicsCommandList2::ResetX (XBOX One 系列主機) — 將命令清單重設回初始狀態，如同剛建立新的命令清單一樣。

將命令清單重設回初始狀態，如同剛建立新的命令清單一樣。

## 語法

```cpp theme={null}
HRESULT ResetX(  
         ID3D12CommandAllocator* pAllocator,  
         ID3D12PipelineState* pInitialState,  
         D3D12XBOX_COMMAND_LIST_RESET_FLAGS Flags  
)  
```

### 參數

*pAllocator*   \_In\_\
類型：[ID3D12CommandAllocator](https://learn.microsoft.com/en-us/windows/win32/api/d3d12/nn-d3d12-id3d12commandallocator)\*

指向定義命令配置器之 **ID3D12CommandAllocator** 物件的指標。

*pInitialState*   \_In\_opt\_\
類型：[ID3D12PipelineState](https://learn.microsoft.com/en-us/windows/win32/api/d3d12/nn-d3d12-id3d12pipelinestate)\*

指向定義管線初始狀態之 **ID3D12PipelineState** 物件的指標。

*Flags*   \_In\_\
類型：[D3D12XBOX\_COMMAND\_LIST\_RESET\_FLAGS](/zh-TW/reference/graphics/d3d12_x/enums/d3d12xbox_command_list_reset_flags_x)

用於重設命令清單的 XBOX 擴充旗標。

### 傳回值

類型：HRESULT

如果成功，則傳回 S\_OK；否則傳回錯誤碼。如需錯誤碼清單，請參閱 [Direct3D 12 傳回碼](https://learn.microsoft.com/en-us/windows/win32/direct3d12/d3d12-graphics-reference-returnvalues)。

## 備註

如需命令清單和命令配置器的詳細資訊，請參閱[建立及記錄命令清單和套件組合](https://learn.microsoft.com/en-us/windows/win32/direct3d12/recording-command-lists-and-bundles#creating-command-lists)。

傳遞 [D3D12XBOX\_COMMAND\_LIST\_RESET\_FLAGS\_MINIMAL\_STATE](/zh-TW/reference/graphics/d3d12_xs/enums/d3d12xbox_command_list_reset_flags) 旗標，以避免在重設期間將預設狀態記錄到清單中。

* 注意:
  執行命令清單時，陣列中的第一個命令清單**不得**以 [D3D12XBOX\_COMMAND\_LIST\_RESET\_FLAGS\_MINIMAL\_STATE](/zh-TW/reference/graphics/d3d12_xs/enums/d3d12xbox_command_list_reset_flags) 旗標重設。

## 需求

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

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

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

## 另請參閱

[ID3D12GraphicsCommandList2](/zh-TW/reference/graphics/d3d12_x/interfaces/ID3D12GraphicsCommandList2/id3d12graphicscommandlist2)


## Related topics

- [ID3D12GraphicsCommandList3](/es/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist3/id3d12graphicscommandlist3_public.md)
- [D3D12_WRITEBUFFERIMMEDIATE_PARAMETER](/reference/graphics/d3d12/structs/d3d12_writebufferimmediate_parameter_public.md)
- [ID3D12CommandAllocator::Reset](/zh-CN/reference/graphics/d3d12/interfaces/id3d12commandallocator/methods/id3d12commandallocator_reset_public.md)
