Jump to content

  • Log In with Google      Sign In   
  • Create Account


State changes


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 TiagoCosta   Crossbones+   -  Reputation: 1865

Like
0Likes
Like

Posted 01 February 2012 - 04:21 AM

Hi,

Is there any difference in performance by calling a state change like IASetVertexBuffers() do some work on CPU then call IASetIndexBuffer() (like mixing DX state calls and other CPU work) or batching all state changing commands and sending them one right after another? I guess that If the command list is empty the GPU will be idle when it could be doing some work...
Tiago Costa
Aqua Engine - my DirectX 11 game "engine" - In development

Sponsor:

#2 phantom   Moderators   -  Reputation: 6790

Like
1Likes
Like

Posted 01 February 2012 - 06:30 AM

The GPU won't start doing work until you do a drawcall or a compute shader dispatch; everything else push data into a command queue on the CPU side.

By batching up all the state change information together and doing it in one go you can gain both data and instruction cache performance increases which can help performance; also it simply makes your code easier to understand and follow.

Basically you want to be setting up all your rendering information in advance and then blasting through the buffer in one go to set states and issue draw calls.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS