Originally Posted by rpg.314
And I am skeptical, as 3d already pointed out, that the driver is optimizing the shaders between frames.
Yes totally agreed in this case and didn't mean to imply that. But trust me, such things have been done and are routinely done on separate threads (which is far less harmful thankfully, although graphics drivers eating a whole thread for themselves is another topic...). More common is shader recompiles due to state changes which can cause nasty spikes too, although normally they subside after a little gameplay. For instance, I think it was NV30 that had to recompile the shader if you changed a uniform/constant from or to zero
I also agree that games should consider using some sort of smoothing function on the raw time deltas (gonna take a closer look at PID controllers, thanks for the link), although it's obviously important to eliminate the spikes as well. In fact, making the critical single-threaded rendering path as predictable and lightweight as possible is important in general.
Thanks for the comments and insight so far guys!