1
\$\begingroup\$

In a more performance-sensitive environment than a desktop CPU/GPU (namely a mobile device) is there really a point in determining whether or not to skip drawing non-visible objects vs reducing the number of draw calls?

I'm working with a scenario of an environment model that has ~10,000 triangles. I could split it up into 30 or so separate mesh such that less than half of those would be visible at any given point. However, would ~15 draw calls be more efficient than vs one draw call for all 10,000 triangles?

\$\endgroup\$
3
  • 1
    \$\begingroup\$ How should we know, you didn't even say what platform you are targeting? Even so you have to test it yourself. \$\endgroup\$ Commented May 19, 2014 at 18:18
  • \$\begingroup\$ @JánosTuránszki - there's a "directx11" tag on the question. Mention of mobile devices makes it obvious: it's Windows Phone. \$\endgroup\$ Commented May 19, 2014 at 21:44
  • \$\begingroup\$ @JimmyShelter It could be a Windows tablet device. \$\endgroup\$ Commented May 19, 2014 at 22:12

1 Answer 1

1
\$\begingroup\$

Why is this a versus question? One of those things usually follows from the other. Also, 15 draw calls are not terribly expensive. If you are in a scenario where you would be able to collapse those 15 draw calls into 1 then you obviously do not have (m)any state changes between the draw calls. The states you do have to change are probably just vertex buffer states, and those are very cheap compared to things like changing render targets.

In modern graphics APIs it is the states you change between draw calls (particularly the validation that follows) that make them expensive. In D3D9 on Windows XP, each draw call lead to a kernel-mode switch irrespective of the states changed and that added a fixed amount of time to each draw call that is no longer relevant. D3D10 / Windows Vista (WDDM) addressed this problem by creating a user-mode component to the Direct3D driver to more efficiently handle command batching and also by reducing the amount of validation by shifting much of it to resource creation time.

You will probably have to profile your solution to come up with any definitive answer, but draw calls themselves are not the enemy.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .