Jump to content

  • Log In with Google      Sign In   
  • Create Account

DirectX 11 Noobie Performance Question


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
2 replies to this topic

#1 jdub   Members   -  Reputation: 320

Like
0Likes
Like

Posted 28 November 2012 - 04:31 PM

I was wondering if there's a significant performance advantage to batching together the rendering of scene objects which use the same shader?
J.W.

Sponsor:

#2 Jason Z   GDNet+   -  Reputation: 2626

Like
1Likes
Like

Posted 28 November 2012 - 08:10 PM

There is potentially a performance advantage. In general you can say that fewer draw calls should be better, but that all depends on what else is going on in your rendered scene. There isn't a straight answer for these type of questions really, you have to profile your application and see what works best in a given circumstance.
Jason Zink :: DirectX MVP
Check out our (now available) D3D11 book: Practical Rendering and Computation with Direct3D 11
Check out my Direct3D 11 engine on CodePlex: Hieroglyph 3
Check out our free online D3D10 book: Programming Vertex, Geometry, and Pixel Shaders
Lunar Rift :: Dual-Paraboloid Mapping Article :: Parallax Occlusion Mapping Article :: Fast Silhouettes Article

#3 Nik02   Members   -  Reputation: 2032

Like
0Likes
Like

Posted 30 November 2012 - 05:57 AM

Generally speaking, the fewer state changes, the better. Of course, if you use heavy logic to implement the batching itself, at some point it ceases to be worthwhile.

If you have a strong GPU but weak CPU (rough measures, I know), you likely benefit more from batching than with a system with strong CPU but relatively weak GPU. Each state change will consume CPU time, even though the setup time on the GPU hardware would be very fast.

Edited by Nik02, 30 November 2012 - 06:04 AM.

Niko Suni
Software developer




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