ID3D12CommandQueue::Wait method (d3d12.h)
Queues a GPU-side wait, and returns immediately. A GPU-side wait is where the GPU waits until the specified fence reaches or exceeds the specified value.
Syntax
HRESULT Wait(
ID3D12Fence *pFence,
UINT64 Value
);
Parameters
pFence
Type: ID3D12Fence*
A pointer to the ID3D12Fence object.
Value
Type: UINT64
The value that the command queue is waiting for the fence to reach or exceed. So when ID3D12Fence::GetCompletedValue is greater than or equal to Value, the wait is terminated.
Return value
Type: HRESULT
This method returns one of the Direct3D 12 Return Codes.
Remarks
Because a wait is being queued, the API returns immediately. It's the command queue that waits (during which time no work is executed) until the fence specified reaches the requested value.
If you want to perform a CPU-side wait (where the calling thread blocks until a fence reaches a particular value), then you should use the ID3D12Fence::SetEventOnCompletion API in conjunction with WaitForSingleObject (or a similar API).
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | d3d12.h |
Library | D3D12.lib |
DLL | D3D12.dll |