
Command list allocators can only be reset when the associated Void D3D12HelloTriangle::PopulateCommandList() The D3D12HelloTriangle sample uses ID3D12GraphicsCommandList::Reset as follows: D3D12_VIEWPORT m_viewport The debug layer will also track graphics processing unit (GPU) progress and issue an error if it can't prove that there are no outstanding executions of the command list. Reset fails for bundles that are referenced by a not yet submitted command list. The runtime will ensure that an allocator is never associated with more than one recording command list at the same time. Reset will fail if it would cause the maximum concurrently recording command list limit, which is specified at device creation, to be exceeded.Īpps must specify a command list allocator. Reset will fail if the command list isn't in the "closed" state.Īfter Reset succeeds, the command list is left in the "recording" state. Runtime validationīefore an app calls Reset, the command list must be in the "closed" state. If a heap is specified for a bundle, the heap must match the calling 'parent' command list’s heap. Either way, bundles can't change the resource heap within the bundle. If a bundle doesn't specify a resource heap, it can't make changes to which descriptor tables are bound. The allocator type, direct command list or bundle, must match the type of command list that is being created. The command allocator that Reset takes as input can be associated with no more than one recording command list at a time.

You can use Reset for both direct command lists and bundles. A typical pattern is to submit a command list and then immediately reset it to reuse the allocated memory for another command list.

Unlike ID3D12CommandAllocator::Reset, you can call Reset while the command list is still being executed.

See Direct3D 12 Return Codes for other possible return values.īy using Reset, you can re-use command list tracking structures without any allocations. E_INVALIDARG if the allocator is currently being used with another command list in the "recording" state or if the specified allocator was created with the wrong type.E_OUTOFMEMORY if the operating system ran out of memory.E_FAIL if the command list was not in the "closed" state when the Reset call was made, or the per-device limit would have been exceeded.Returns S_OK if successful otherwise, returns one of the following values: So there is little cost in not setting the initial pipeline state parameter if it isn't convenient.įor bundles on the other hand, it might make more sense to try to set the initial state parameter since bundles are likely smaller overall and can be reused frequently. The overhead for this is low, particularly for a command list, for which the overall cost of recording the command list likely dwarfs the cost of one initial state setting.
#Eyespy command list drivers#
If NULL, the runtime sets a dummy initial pipeline state so that drivers don't have to deal with undefined state. ID3D12PipelineState *pInitialStateĪ pointer to the ID3D12CommandAllocator object that the device creates command lists from.Ī pointer to the ID3D12PipelineState object that contains the initial pipeline state for the command list. Resets a command list back to its initial state as if a new command list was just created.
