Skip to main content
Associates a name with the device object. This name is for use in debug diagnostics and tools.

Syntax

Parameters

Name [in]
Type: LPCWSTR
A NULL-terminated UNICODE string that contains the name to associate with the device object.

Return value

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

Remarks

This method takes UNICODE names. Note that this is simply a convenience wrapper around ID3D12Object::SetPrivateData with WKPDID_D3DDebugObjectNameW. Therefore names which are set with SetName can be retrieved with ID3D12Object::GetPrivateData with the same GUID. Additionally, D3D12 supports narrow strings for names, using the WKPDID_D3DDebugObjectName GUID directly instead.

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

Direct3D 12 Programming Environment Setup ID3D12Object
Last modified on August 20, 2026