I was wondering if there's a significant performance advantage to batching together the rendering of scene objects which use the same shader?
DirectX 11 Noobie Performance Question
Started by jdub, Nov 28 2012 04:31 PM
2 replies to this topic
Sponsor:
#2 GDNet+ - Reputation: 2626
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
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 Members - Reputation: 2032
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.
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
Software developer






