Triple Buffering

rwolf

Rock Star
Regular
I noticed the Catalyst 3.7 drivers added triple buffering in OpenGL. I was wondering if someone could explain what the advantage of triple buffering is? When does it offer better performance and would you see the best performance on a 256MB card? Has anyone seen any triple buffer benchmarks?
 
IIRC, triple buffering allows you to start rendering a new scene while the back buffer is being swapped with the screen buffer.
 
I assume if you have vsync enabled and have finished drawing the screen in the second buffer you can start drawing in the third buffer while waiting for the display to switch to the second buffer.

Are there other reasons to use triple buffering?
 
rwolf said:
I assume if you have vsync enabled and have finished drawing the screen in the second buffer you can start drawing in the third buffer while waiting for the display to switch to the second buffer.

Are there other reasons to use triple buffering?
No, vsync is exactly the reason.

Let's say you're playing game X and your graphics card can draw this game in about 65 fps. Now you've set your monitor up to 70 Hz. That means the graphics card is not fast enough to paint one picture per vsync. What is the result of this? With double buffering the graphics card must wait for the vsync until it can begin to draw the next frame. But since the card is slower than the display, the next frame is only about 90% ready, when the next vsync appears. As a result the vsync is missed. The graphics card must complete the remaining 10% of the frame during the next vsync interval. But after the frame is complete, the graphics card must wait again for the next vsync. During this time the GPU is idle and can't do anything. After the next vsync this begins again. The result is clear: You always get one frame in 2 vsyncs. As a result you will get exactly half of the vsync rate, which will be 35 fps - although your GPU is (when ignoring the vsync) able to pull 65 fps. What a waste!!

With tripple buffering this problem is solved. The GPU has always a buffer it can draw to. It never ever is idle (except if it's constantly faster than the vsync). As a result you will really see those 65 fps, although the frames are nicely synchronized with the vsync.
 
rwolf said:
When does it offer better performance
If (1) vsync is on *and* if (2) the minimum fps is lower than the display frequency.
rwolf said:
would you see the best performance on a 256MB card?
Well, tripple buffering needs more memory than double buffering. A 1600x1200 buffer costs about 8 MB. If this additional 8 MB don't fit in your 128 MB card (that depends on how much textures the game is using), then a 256 MB card might show noticable higher performance.
rwolf said:
Has anyone seen any triple buffer benchmarks?
Benchmarks are usually done with vsync off - and with vsync off a tripple buffer has no advantage. I've not seen any tripple buffering benchmarks yet.
 
To give you and idea I use 6xfsaa on a 9800 with 16tap aniso. I have tripple buffering enabled and my refresh rate at 85. THe 9800pro does mohaa (medal of honor allied asault) at those settings at about 70fps . With out tripple buffering the frame rate is not constant. With tripple buffering it is . Its much smoother and no jerks .
 
The brief summary is that it allows the card to effectively render in frame times (frame time == 1 / frame rate) that aren't an exact multiple of the video frame time - thereby giving all the benefits of vsync off without the tearing (at the cost of very slightly higher latency).
 
Triple is spelled with one 'p.' Why do so many ppl add the extra 'p'--inside joke (like Xobx) or just bad spelling? :p
 
Pete said:
Triple is spelled with one 'p.' Why do so many ppl add the extra 'p'--inside joke (like Xobx) or just bad spelling? :p
I've written it with two "p"s because it looked alright that way to my german eyes... :)
 
one huge thing web browsers/forums lack right now is a spellchecker/autocorrect system. I know this is totally OT, but why isnt there one? I mean, my IM program (Trillian) has autocorrects and a spellchecker, albeit primitive. It SHOULD let you import dictionary/autocorrects between word, it, etc. But hwy has this feature not yet made it to forums or web browsers?
 
madshi said:
I've written it with two "p"s because it looked alright that way to my german eyes... :)
Nein! ;)

Yes, Althornin, hwy? HWY, crazy world?! :p
 
Because "triple" looks like it is pronounced like "tripe" (+ 'l'), is it?

The swedish word is spelled "trippel", so I'm not surprised if Swedes spell it with two 'p'.
 
Althornin said:
one huge thing web browsers/forums lack right now is a spellchecker/autocorrect system. I know this is totally OT, but why isnt there one? I mean, my IM program (Trillian) has autocorrects and a spellchecker, albeit primitive. It SHOULD let you import dictionary/autocorrects between word, it, etc. But hwy has this feature not yet made it to forums or web browsers?
Because it wouldn't help those who confuse "lose" and "loose", and "there, their, and they're" :)
 
Pete said:
Yes, Althornin, hwy? HWY, crazy world?! :p
Exactly.
(I actually saw that error, but i did type it, and decided to leave it for fun :))


But Simon, it would help those of us who know all the letters, and the proper order, but just have fingers that habitually get ahead of themselves.
 
Althornin said:
But Simon, it would help those of us who know all the letters, and the proper order, but just have fingers that habitually get ahead of themselves.
Oh that is true. Happens to me all the tiem.

Dio said:
The brief summary is that it allows the card to effectively render in frame times (frame time == 1 / frame rate) that aren't an exact multiple of the video frame time - thereby giving all the benefits of vsync off without the tearing (at the cost of very slightly higher latency).

"Higher latency"? I guess you must be comparing "Double Buffering VSync Off" with "Triple Buffering (VS on)".

I would hazard a guess, though, that "TB(+VS)" would usually have lower latency than "DB+VS".
 
I think it could be slightly higher. With double buffering, you can never be rendering more than 1.999 frames ahead, while it could be 2.999 frames for triple buffering.

I think.
 
Dio said:
I think it could be slightly higher. With double buffering, you can never be rendering more than 1.999 frames ahead, while it could be 2.999 frames for triple buffering.

I think.

Oro? I don't follow u here on how that increases latency? what latency are we referring to anyohw?
 
There's a good explanation of all this here

However, with triple buffering your input (mouse and keyboard) lags behind one frame compared to double buffering. The reason is the fact that with double buffering there is only one frame drawn beforehand that your input can't effect, but with triple buffering there are ususally two frames buffered. So, if your game plays at 50 fps, you usually have an input lag of 20 ms (at least) with double buffering, but with triple buffering you would have an input lag of 40 ms (at least).

Shameless quote from nVnews
 
notAFanB said:
I don't follow u here on how that increases latency? what latency are we referring to anyohw?
There is a time between the engine issuing the commands saying 'draw this' and the user viewing it. This is the execute / swap latency.
 
Back
Top