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

# Write64BitValueTopOfPipeX (XBOX One 系列)

> 在管線頂端將 64 位元值寫入記憶體中的指定目的地。

在管線頂端將 64 位元值寫入記憶體中的指定目的地。

## 語法

```cpp theme={null}
void Write64BitValueTopOfPipeX(  
         D3D12_GPU_VIRTUAL_ADDRESS Destination,  
         UINT64 Value,  
         D3D12XBOX_WRITE_VALUE_TOP_FLAGS Flags  
)  
```

### 參數

*Destination*   \_In\_\
類型：D3D12\_GPU\_VIRTUAL\_ADDRESS

將寫入值的圖形記憶體基底位址。此位址必須以 8 位元組對齊。

*Value*   \_In\_\
類型：UINT64

未選取時間戳記選項時要寫入的 64 位元值。如果已選取時間戳記選項，此值必須設為 0。

*Flags*   \_In\_\
類型：[D3D12XBOX\_WRITE\_VALUE\_TOP\_FLAGS](/zh-TW/reference/graphics/d3d12_x/enums/d3d12xbox_write_value_top_flags)

**D3D12XBOX\_WRITE\_VALUE\_TOP\_FLAGS** 列舉常數的位元 OR 組合，指定要寫入記憶體的值。寫入值的來源取決於所選取的常數：

* **D3D12XBOX\_WRITE\_VALUE\_TOP\_FLAG\_NONE** 會寫入所指定的 *Value* 參數。
* **D3D12XBOX\_WRITE\_VALUE\_TOP\_FLAG\_WAIT\_FOR\_WRITE\_RETURN** 會在確認未完成的記憶體寫入皆已完成後，寫入所指定的 *Value*。
* **D3D12XBOX\_WRITE\_VALUE\_TOP\_FLAG\_SELECT\_ENGINE\_PFP** 會從預先擷取剖析器引擎寫入所指定的 *Value*。這比從預設引擎選取更早發生。
* **D3D12XBOX\_WRITE\_VALUE\_TOP\_FLAG\_GPU\_TIMESTAMP** 會寫入目前 GPU 時脈計數器的值。
* **D3D12XBOX\_WRITE\_VALUE\_TOP\_FLAG\_SYSTEM\_TIMESTAMP** 會寫入目前系統時脈計數器的值。

### 傳回值

類型：void

## 備註

64 位元值會在所有著色器執行和轉譯後端處理完成之後寫入記憶體。此值通常會在先前繪製和分派所產生的所有記憶體寫入完成之前寫入。

搭配 [Wait64BitValueX](/zh-TW/reference/graphics/d3d12_x/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_wait64bitvaluex) 方法使用時，**Write64BitValueTopOfPipeX** 可作為實用的跨引擎、命令清單內同步處理機制。

## 需求

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

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

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

## 另請參閱

[ID3D12GraphicsCommandList](/zh-TW/reference/graphics/d3d12_x/interfaces/id3d12graphicscommandlist/id3d12graphicscommandlist)\
[Write32BitValueTopOfPipeX](/zh-TW/reference/graphics/d3d12_x/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_write32bitvaluetopofpipex)\
[Write64BitValueBottomOfPipeX](/zh-TW/reference/graphics/d3d12_x/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_write64bitvaluebottomofpipex)


## Related topics

- [NDA 主題目錄 - Microsoft Learn 線上連結](/zh-TW/nda/nda-topic-directory.md)
- [GetXmaFrameBitPosition](/zh-TW/reference/audio/xma2defs/functions/getxmaframebitposition.md)
- [GetXmaFrameLengthInBits](/zh-TW/reference/audio/xma2defs/functions/getxmaframelengthinbits.md)
- [GetLastXmaFrameBitPosition](/zh-TW/reference/audio/xma2defs/functions/getlastxmaframebitposition.md)
- [SetGraphicsRoot32BitConstant](/zh-TW/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_setgraphicsroot32bitconstant_public.md)
