0
\$\begingroup\$

In my research for a stuttering problem in my game engine, I think, I have found the problem, but don't have any idea why this is happening, that's why I ask you if you have an idea !

The situation : DirectX10 under win7 simple engine. If running fullscreen (and only in fullscreen), with Vsync On and the rendering loop going much more faster than the vsync ==> Stutter (Frame dropped by the driver).

My base solution at this moment : Make the call to device.present() not faster than the Vsync !

My questions : - What is happening here ? It seems that the called to .present() "is caching" frames, and if the cache is full, it can go to throw away a frame ==> It makes the stutter ! - Why is it not happening in windowed mode under the exact same situation (back buffer resolution, scene, ...) ???

Edit : Here is a Pix debugging screen (big picture), showing the stuttering : http://www.s33m3.be/PIX/PIX3.png You can see that frame 912, that did exactly the same amount of work as other frames, wasn't processed by the GPU. (No GPU start/Duration). And after debugging, it just that for this frame the call to .Present() was really low (more then 10 times faster than the average .Present() of the other frames !

So how can I disable in DirectX10 this "feature" to throw aways frames ? I would prefer the Present method to hold instead of dropping a frame !

\$\endgroup\$
1
  • \$\begingroup\$ Just my 2 cents. Not a dev, but we experienced DX10 stutter on all games on 2 to 3 PCs out of 70 that all have the same hardware. The issue was dirty contacts of the CPU, after thoroughly cleaning the CPU with an eraser DX10 stutter was gone. \$\endgroup\$
    – ochitos
    Jan 22, 2015 at 9:25

1 Answer 1

2
\$\begingroup\$

That's not vsync. The call to Present() will block until the appropriate time if you have vsync enabled. This means that unless you're trying multi-threaded rendering, which DX10 does not support, this shouldn't happen- that is, it should be impossible to Present() multiple times a frame.

\$\endgroup\$
2
  • \$\begingroup\$ Then how is this things possible (Pix debugging the fullscreen stutering things) : s33m3.be/PIX/PIX.png. As you can see, multiple frames are rendered at once in full screen ! (even with Vsync enabled). And the next frame doesn't wait the end of the previous one to start ! I can also show you (from pix) frame generated by the cpu, but never send to the GPU (throw away = stutter) \$\endgroup\$
    – Fabian
    May 5, 2011 at 14:45
  • \$\begingroup\$ @Fabian: Have you tried changing the "maximum pre-rendered frames" setting in the NVIDIA Control Panel? \$\endgroup\$
    – Zach
    May 6, 2011 at 23:37

You must log in to answer this question.

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