Skip to main content
Creates a descriptor heap object.

Syntax

Parameters

pDescriptorHeapDesc [in]
Type: const D3D12_DESCRIPTOR_HEAP_DESC *
A pointer to a D3D12_DESCRIPTOR_HEAP_DESC structure that describes the heap. riid
Type: const IID &
The globally unique identifier (GUID) for the descriptor heap interface. See Remarks. An input parameter. ppvHeap [out]
Type: void **
A pointer to a memory block that receives a pointer to the descriptor heap. ppvHeap can be NULL, to enable capability testing. When ppvHeap is NULL, no object will be created and S_FALSE will be returned when pDescriptorHeapDesc is valid.

Return value

Type: HRESULT This method returns E_OUTOFMEMORY if there is insufficient memory to create the descriptor heap object. See Direct3D 12 Return Codes for other possible return values.

Remarks

The REFIID, or GUID, of the interface to the descriptor heap can be obtained by using the __uuidof() macro. For example, __uuidof(ID3D12DescriptorHeap) will get the GUID of the interface to a descriptor heap.

Examples

The D3D12HelloWorld sample uses ID3D12Device::CreateDescriptorHeap as follows: Describe and create a render target view (RTV) descriptor heap.
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

ID3D12Device
Last modified on August 20, 2026