ID3D11DeviceContext::ExecuteCommandList Method

Queues commands from a command list onto a device.

Syntax

public:
void ExecuteCommandList(
         ID3D11CommandList *pCommandList,
         BOOL RestoreContextState
)  

Parameters

pCommandList
Type: ID3D11CommandList *

[in] A pointer to an ID3D11CommandList interface that encapsulates a command list.

RestoreContextState
Type: BOOL 

A Boolean flag that determines whether the immediate context state is saved prior to and restored after the execution of a command list. Use TRUE to indicate that the runtime needs to save and restore the state. Use FALSE to indicate that no state shall be saved or restored, which causes the immediate context to return to its default state after the command list executes. Applications should typically use FALSE unless they will restore the state to be nearly equivalent to the state that the runtime would restore if TRUE were passed. When applications use FALSE, they can avoid unnecessary and inefficient state transitions.

This parameter must be set to FALSE if the method is being used with Draw Bundles.

Return value

None.

Remarks

Use this method to play back a command list that was recorded by a deferred context on any thread.

This method performs some runtime validation related to queries. Queries that are begun in a device context cannot be manipulated indirectly by executing a command list (that is, Begin or End was invoked against the same query by the deferred context which generated the command list). If such a condition occurs, the ExecuteCommandList method does not execute the command list. However, the state of the device context is still maintained, as would be expected (ID3D11DeviceContext::ClearState is performed, unless the application indicates to preserve the device context state).

Requirements

Header: Declared in d3d11_x.h (d3d11.h on other Windows platforms).

Library: Use d3d11_x.lib (d3d11.lib on other Windows platforms).

See also

ID3D11DeviceContext

ID3D11DeviceContext Members