Skip to main content
Updates a fence to a specified value.

Syntax

Parameters

pFence
Type: ID3D12Fence *
A pointer to the ID3D12Fence object. Value
Type: UINT64
The value to set the fence to.

Return value

Type: HRESULT This method returns one of the Direct3D 12 Return Codes.

Remarks

Use this method to set a fence value from the GPU side. Use ID3D12Fence::Signal to set a fence from the CPU side.

Examples

Adds a signal to the command queue, then waits for the compute shader to complete the simulation, finally signal and increment the fence value.
Refer to the Example Code in the D3D12 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

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