What am I forgetting to optimize?

Started by
10 comments, last by Hodgman 9 years, 11 months ago

My game slows down to 24 fps in 1920x1080 fullscreen mode. Other games like Company of Heroes or Dawn of War or Simcity 5 probably have more things on screen yet they're able to run at 30 fps. Why?

2014-05-26%2004-29-35.jpg

It only happens when I zoom up to here or closer:

2014-05-26%2004-34-04.jpg

Advertisement

As sole indie dev you should always be happy with the 80% part of the pareto principle (80-20 rule), and 80% of 30fps is 24 fps, therefor all is fine wink.png

Profile all of dat code and youll find out.

Could it have something to do with the camera angle relative to the ground? Do you have LoD for everything?

o3o

What are you forgetting to measure? ;-)

Assuming it's a GPU side problem (first time the swap buffers call to see if the CPU is waiting there for the GPU), Put some GPU queries around some draw calls, and see what gets expensive when you zoom in like that.

profile.png

All of the top slow downs are part of the Intel OpenGL driver.

DrvSetCallbackProcs appears to just set the pointers to the standard OpenGL functions. But why is it being measured? I only started profiling after the map loaded.

http://dri.freedesktop.org/doxygen/gallium/stw__icd_8c.html#51f95005fe32929028a8d35cb8d3019b

I made a mistake. DrSetCallbackProcs outputs debug information or something.

void APIENTRY DrvSetCallbackProcs ( INT nProcs, PROC * pProcs )

Definition at line 199 of file stw_icd.c.

References debug_printf().

00202 {
00203 debug_printf( "%s( %d, 0x%p )\n", __FUNCTION__, nProcs, pProcs );
00204
00205 return;
00206 }

This is the mesa OpenGL driver source though I think.

Find a GPU profiler or do it manually by disabling features until you find one that takes too long?

o3o

If you zoom in and get FPS drop that's probably becouse you're fillrate bound by your Particle System.

There's small chance that you're ALU bound(heavy pixel shaders) but i woudln't count on that.

1. Reducing the shadow map from 2048x2048 to 1024x1024 was the first thing that caused FPS to increase to 30

2. Having the camera amidst the exhaust particles caused lag, possibly because of sorting, but I don't see why sorting would need to do more work

3. Removing bump and specular on 200 units

But now the shadows are missing on the trees. A minor detail, messed something up.

Your screenshot indicates you're running on Intel graphics, if you're on a laptop with dual graphics, make sure your app uses the right GPU.

This topic is closed to new replies.

Advertisement