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

# Wait32BitValueX (XBOX One 系列)

> 等候記憶體中指定來源位置的 32 位元值符合比較條件。

等候記憶體中指定來源位置的 32 位元值符合比較條件。

## 語法

```cpp theme={null}
void Wait32BitValueX(  
         D3D12_GPU_VIRTUAL_ADDRESS Address,  
         D3D12_COMPARISON_FUNC ComparisonFunction,  
         UINT ReferenceValue,  
         UINT MaskValue,  
         D3D12XBOX_WAIT_FLAGS Flags  
)  
```

### 參數

*Address*   \_In\_\
類型：[D3D12\_GPU\_VIRTUAL\_ADDRESS](https://learn.microsoft.com/en-us/windows/win32/direct3d12/d3d12_gpu_virtual_address)

包含等候評估值之圖形記憶體的基底位址。位址必須以 4 位元組對齊。

*ComparisonFunction*   \_In\_\
類型：[D3D12\_COMPARISON\_FUNC](https://learn.microsoft.com/en-us/windows/win32/api/d3d12/ne-d3d12-d3d12_comparison_func)

**D3D12\_COMPARISON\_FUNC** 列舉常數，指定作為等候條件基礎的函式。

會使用此函式，將 *Address* 記憶體位置的值與 *ReferenceValue* 進行測試。使用 PFP 引擎執行的等候只能使用 **D3D12\_COMPARISON\_FUNC\_GREATER\_EQUAL** 作為 *ComparisonFunction*。

*ReferenceValue*   \_In\_\
類型：UINT

作為等候比較基礎的值。

*MaskValue*   \_In\_\
類型：UINT

在比較之前套用至記憶體值的遮罩。遮罩會以位元 AND 運算套用。

*Flags*   \_In\_\
類型：[D3D12XBOX\_WAIT\_FLAGS](/zh-TW/reference/graphics/d3d12_x/enums/d3d12xbox_wait_flags)

選擇性的 **D3D12XBOX\_WAIT\_FLAGS** 列舉常數位元 OR 組合，指定要使用哪個引擎來執行等候：

* **D3D12XBOX\_WAIT\_FLAG\_NONE** 使用微引擎 (ME) 執行等候。
* **D3D12XBOX\_WAIT\_FLAG\_SELECT\_ENGINE\_PFP** 使用預先擷取剖析器 (PFP) 引擎執行等候。

### 傳回值

類型：void

無。

## 備註

當 ((Value-at-*Address* & *MaskValue*) \<*ComparisonFunction*> *ReferenceValue*) 評估為 **true** 時，即符合等候條件。

<Note>
  若無法符合等候條件，將導致 GPU 停止回應。請謹慎發出等候。
</Note>

## 需求

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

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

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

## 另請參閱

[ID3D12GraphicsCommandList](/zh-TW/reference/graphics/d3d12_x/interfaces/id3d12graphicscommandlist/id3d12graphicscommandlist)\
[Wait64BitValueX](/zh-TW/reference/graphics/d3d12_x/interfaces/id3d12xboxdmacommandlist/methods/id3d12xboxdmacommandlist_wait64bitvaluex)\
[Write32BitValueBottomOfPipeX](/zh-TW/reference/graphics/d3d12_x/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_write32bitvaluebottomofpipex)


## Related topics

- [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)
- [SetGraphicsRoot32BitConstants](/zh-TW/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_setgraphicsroot32bitconstants_public.md)
