# [D3D12] ExecuteIndirect Question

This topic is 1043 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I would like to check with you if I have understood correctly how ExecuteIndirect is used - I am feeling a bit confused by MSDN documentation.

void ExecuteIndirect(
[in]           ID3D12CommandSignature *pCommandSignature,
[in]           UINT                   MaxCommandCount,
[in]           ID3D12Resource         *pArgumentBuffer,
[in]           UINT64                 ArgumentBufferOffset,
[in, optional] ID3D12Resource         *pCountBuffer,
[in]           UINT64                 CountBufferOffset
);


ID3D12CommandSignature *pCommandSignature
Allows to specify the indirect argument buffer format, the command type and the set of resources common for all the draw commands.

ID3D12Resource *pArgumentBuffer
An indirect argument buffer, which contains data for each draw command, in accordance to the format defined at pCommandSignature creation?

As far as I understood from the documentation, there can be only one instance of pCommandSignature per ExecuteIndirect.
Does this mean that the function can execute only commands of the same type?
For instance, I will be able to run DRAW commands but not both DRAW and DRAW_INDEXED commands?

The commands should have more or less the same indirect argument buffer format to group them into ExecuteIndirect call?
In case I have DRAW_INDEXED commands which accept different data, it will be probably more wise to execute them separately instead of making one universal format for all of them just because they are of the same type.

?

##### Share on other sites

As far as I understood from the documentation, there can be only one instance of pCommandSignature per ExecuteIndirect.
Does this mean that the function can execute only commands of the same type?
For instance, I will be able to run DRAW commands but not both DRAW and DRAW_INDEXED commands?

That's what I think as well, in addition the page on indirect drawing has the following quote.

"A given command signature is either a draw or a compute command signature. If a command signature contains a drawing operation, then it is a graphics command signature. Otherwise, the command signature must contain a dispatch operation, and it is a compute command signature."

thats the closest I got to it being stated explicitly.

##### Share on other sites

Thanks Infinisearch for the input!

1. 1
2. 2
Rutin
25
3. 3
4. 4
JoeJ
18
5. 5

• 14
• 22
• 11
• 11
• 9
• ### Forum Statistics

• Total Topics
631764
• Total Posts
3002210
×