Skip to main content
Indicates to re-use the memory that is associated with the command allocator.

Syntax

Parameters

Return value

Type: HRESULT This method returns E_FAIL if there is an actively recording command list referencing the command allocator. The debug layer will also issue an error in this case. See Direct3D 12 Return Codes for other possible return values.

Remarks

Apps call Reset to re-use the memory that is associated with a command allocator. From this call to Reset, the runtime and driver determine that the graphics processing unit (GPU) is no longer executing any command lists that have recorded commands with the command allocator. Unlike ID3D12GraphicsCommandList::Reset, it is not recommended that you call Reset on the command allocator while a command list is still being executed. The debug layer will issue a warning if it can’t prove that there are no pending GPU references to command lists that have recorded commands in the allocator. The debug layer will issue an error if Reset is called concurrently by multiple threads (on the same allocator object).

Examples

The D3D12HelloTriangle sample uses ID3D12CommandAllocator::Reset as follows:
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

ID3D12CommandAllocator
Last modified on August 20, 2026