Sign in to follow this  

[D3D12] ExecuteIndirect Question

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

If you intended to correct an error in the post then please contact us.

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.
 
Thanks in advance!

?

Share this post


Link to post
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 this post


Link to post
Share on other sites

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

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this