Skip to main content
Specifies an event that’s raised when the fence reaches a certain value.

Syntax

Parameters

Value
Type: UINT64
The fence value when the event is to be signaled. hEvent
Type: HANDLE
A handle to the event object.

Return value

Type: HRESULT This method returns E_OUTOFMEMORY if the kernel components don’t have sufficient memory to store the event in a list. See Direct3D 12 return codes for other possible return values.

Remarks

To specify multiple fences before an event is triggered, refer to SetEventOnMultipleFenceCompletion. If hEvent is a null handle, then this API will not return until the specified fence value(s) have been reached. This method can be safely called from multiple threads at one time.

Examples

The D3D12Multithreading sample uses ID3D12Fence::SetEventOnCompletion as follows:
Refer to the Example code in the Direct3D 12 reference.

Requirements

Header: d3d12_xs.h or d3d12_x.h
Library: d3d12_xs.lib or d3d12_x.lib
Supported Platforms: XBOX Series consoles and XBOX One family

See Also

ID3D12Fence Multi-engine synchronization
Last modified on August 20, 2026