Irregular high framerates due to SwapBuffer taking no time

Started by
1 comment, last by Novative 13 years, 6 months ago
Hi all,

I'm having trouble nailing down a problem with frame rate variations and can't quite wrap my head around it.

(Using OpenGL 2.0 on GeForce GTX260)

I'm obvserving the following behaviour:

Without user interaction, my rendertime falls from average 24 ms to 2 ms about every 41th frame. This is due to SwapBuffer needing zero time in these frames and is repeatable across application runs. This happens also with VerticalSync off.

With movement of the viewer (and resulting different load on the gpu) the problem gets a lot worse.

I'm familiar with OpenGL working asynchronously and that measurements of OpenGL-calls and SwapBuffer calls aren't quite reliable. However, the regularity is too striking to be random noise.

The problem is fixed with a glFinish-call before SwapBuffers, but limits the desired parallelism of gpu and cpu.

So,is anybody experiencing similiar phenomena and if so, how do you counteract it? Can anybody offer an explanation of why it happens?

Thanks for any input,

Chris
Advertisement
I think this could happen to my Direct3D application, too. I also get those spikes in my FPS, so it could be that it isn't a problem just with OpenGL.

But one more thing: Did you try fullscreen mode? In my case all those spikes were gone then! [smile]
Thanks for your respone! Fullscreen unfortunately shows the same effect.

This topic is closed to new replies.

Advertisement