public:
HRESULT CreateCommandListX(
const D3D12XBOX_COMMAND_LIST_DESC pDesc,
ID3D12CommandAllocator *pCommandAllocator,
ID3D12PipelineState *pInitialState,
REFIID riid,
void **ppCommandList
)
pDesc
Type: D3D12XBOX_COMMAND_LIST_DESC
[in] The description of the command list to create, in a D3D12XBOX_COMMAND_LIST_DESC structure.
pCommandAllocator
Type: ID3D12CommandAllocator *
[in] A pointer to the ID3D12CommandAllocator object that the device creates command lists from.
pInitialState
Type: ID3D12PipelineState *
[in, optional] A pointer to the ID3D12PipelineState object that contains the initial pipeline state for the command list. This is optional and can be NULL. If NULL, the runtime sets a dummy initial pipeline state so that drivers don’t have to deal with undefined state. 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. So there is little cost in not setting the initial pipeline state parameter if it isn’t convenient.
For 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.
riid
Type: REFIID
The globally unique identifier (GUID) for the command list interface. The REFIID, or GUID, of the interface to the command list can be obtained by using the __uuidof() macro. For example,
__uuidof(ID3D12CommandList)
will get the GUID of the interface to a command list.
ppCommandList
Type: void **
[out] A pointer to a memory block that receives a pointer to the ID3D12CommandList or ID3D12GraphicsCommandList interface for the command list.
Type: HRESULT
This method returns E_OUTOFMEMORY if there is insufficient memory to create the command list. Refer to Direct3D 12 return codes for other possible return values.
The device creates command lists from the command allocator.
Header: Declared in d3d12_x.h.
Library: Use d3d12_x.lib.