Skip to main content
Gets a debug interface. Use D3D12GetInterface to directly access newer interfaces, especially downlevel.

Syntax

Parameters

riid [in]
Type: const IID &
The globally unique identifier (GUID) for the debug interface. The REFIID, or GUID, of the debug interface can be obtained by using the __uuidof() macro. For example, __uuidof(ID3D12Debug) will get the GUID of the debug interface. ppvDebug [out, optional]
Type: void **
The debug interface, as a pointer to pointer to void. See ID3D12Debug and ID3D12DebugDevice.

Return value

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

Remarks

The function signature PFN_D3D12_GET_DEBUG_INTERFACE is provided as a typedef, so that you can use dynamic linking techniques (GetProcAddress) instead of statically linking.

Examples

Enable the D3D12 debug layer.
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

Core Functions
Last modified on August 20, 2026