ID3D12Device::RegisterCustomFenceLocationX Method

Registers a memory location that is used for custom fence synchronization with the GPU hang reporting infrastructure.

Syntax

public:
UINT32 RegisterCustomFenceLocationX(
         D3D12_GPU_VIRTUAL_ADDRESS FenceGpuAddress,
         LPCWSTR pName
)  

Parameters

FenceGpuAddress
Type: D3D12_GPU_VIRTUAL_ADDRESS 

[in] The address of the fence.

pName
Type: LPCWSTR 

[in] A name to associate with the fence address.

When storing the name in the driver’s custom fence location table, the name is clamped to 24 characters in length, including the terminating null character.

Return value

Type: UINT32 

The return value is a handle that can be used to unregister the memory location (using UnregisterCustomFenceLocationX). If a value of -1 (0xFFFFFFFF) is returned, the registration was unsuccessful.

Remarks

If a fence wait GPU hang is detected, the address being waited upon will be checked against the list of registered custom fence locations to annotate the hang report with the memory location names.

Note that custom fence registration is only functional in debug and instrumented builds of the graphics driver. Up to 64 locations can be registered at a time. Setting the name of a ID3D12Fence API object using ID3D12Object::SetName will use one of these 64 entries.

Requirements

Header: Declared in d3d12_x.h.

Library: Use d3d12_x.lib.

See also

Reference

ID3D12Device Interface

ID3D12Device Members