Jump to content

  • Log In with Google      Sign In   
  • Create Account


App bottleneck - frame drops


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 Martin Perry   Members   -  Reputation: 1256

Like
0Likes
Like

Posted 24 August 2013 - 03:38 AM

I am newbie to OpenGL ES (so far, I used mainly DX11). Now for my scene, I have about 100 draw calls. I can use instancing, but only about half of objects can be instanced, so draw calls count would be about 50 - 60 / frame. Every object is max. 700 triangles (I use low-poly models)

What is some kind of limit of drawcalls per scene (targeting iPhone 4 like performance devices) ? So far I am running my code via NVidia GLES (http://developer.download.nvidia.com/tegra/docs/win_es2emu_pack_v100.pdf) on Windows, but there is a lot of power from my CPU and GPU, so I can tell, how it will behave on mobile device.

 

Or is there a way, how to find bottleneck of my application ? I know gDebugger is for OpenGL, but with ES version it behave sometimes weird (a lot of warnings in calls I dont have in my code, so I suspect them to be from GLES layer code).


Edited by Martin Perry, 24 August 2013 - 03:45 AM.


Sponsor:

#2 C0lumbo   Crossbones+   -  Reputation: 2202

Like
0Likes
Like

Posted 25 August 2013 - 01:07 AM

The only way to find out what the bottleneck is, is by running your game on a target device and profiling. You're just not going to get a good answer running GLES on Windows, or even the iOS simulator on a Mac.

 

The iOS development tools include profilers which will help you identify where your CPU time is going and whether you are bound by fill-rate, vertex processing time or by CPU.

 

But I imagine you want some rule of thumb, so here's my guestimate. Earlier iOS devices had a pretty severe CPU cost per draw call, and I have spent a lot of time rearranging things to absolutely minimize draw calls for apps that targeted 3GS and earlier. Since then, Apple have improved the drivers a lot, and the CPUs have improved greatly too. Given you are targeting only iPhone 4 and onwards, draw calls should not be such a big issue for you, especially if you are using vertex buffer objects. 100 draw calls is probably enough to make a mark on your CPU profile, but is unlikely IMO to be a dominating factor in stopping you from hitting 60fps. To pluck a figure out of the air, I'd imagine it'll eat about 20% of your frame time.

 

Often, the trickier problem if you're targeting iPhone4 and iPad1 is that they have a lot of pixels, and not enough GPU power to cope, so fill-rate is usually a big problem. Hopefully your product doesn't require a lot of transparency, and your pixel shaders are super simple. If you're doing per-pixel lighitng, then you'd better implemenet a per-vertex alternative to use on Phone4/iPad1. You'll also need to make good use of the GLES shader precision in your shaders to squeeze out the most from your pixel shaders.






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