Jump to content
  • Advertisement
Sign in to follow this  
_void_

[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.

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
Advertisement


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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!