Memory Hit of Triple Buffering

Quitch

Veteran
Triple Buffering is used to overcome the downside of VSync (good thing) but uses more memory (bad thing... are you sitting comfotably?), what I would like to know is what sort of memory hit that is? I mean, are we talking about something that was bad in the 32MB card days and you can ignore now, or something that every generation of card should worry about as textures get larger?

What sort of memory hit does Triple Buffering have?
 
Quitch said:
Triple Buffering is used to overcome the downside of VSync (good thing) but uses more memory (bad thing... are you sitting comfotably?), what I would like to know is what sort of memory hit that is? I mean, are we talking about something that was bad in the 32MB card days and you can ignore now, or something that every generation of card should worry about as textures get larger?

What sort of memory hit does Triple Buffering have?

depends on the resolution and color/z depth you use. With triple-buffering you need a second backbuffer
 
One buffer holds the final image as it's presented on screen.

Therefor the size of the buffer is directly dependend of the screen resolution and color depth.

The formular is width x height x colordepth / 8

For 1280x1024 with 32 bits it would be:

1280 x 1024 x 32 / 8 = 5242880 Bytes (exactly 5 MB)

Usually a game uses two buffers (double buffering), that means there are 10 MB reserved for the buffers. Triple buffering costs another 5 MB in this case.
 
Never gave it to much thought,... but what exactly adds the third buffer in to the mix ? I mean double-buffering should be enough to be able to vsync,... or maybe not ... :?
 
If your frame rate is less than the refresh rate of your monitor, your framerate will halve with VSync on. Triple Buffering resolves this problem by... oh my, is that the time?
 
cristic said:
Never gave it to much thought,... but what exactly adds the third buffer in to the mix ? I mean double-buffering should be enough to be able to vsync,... or maybe not ... :?
Yes, but with double buffering your rendering rate is tied to some integer fraction of the refresh rate. That is, each frame can only start when one of the buffers is released and so you get an instaneous rendering rate which is one of 1, 1/2, 1/3, 1/4 etc of the refresh rate.

For example, if your refresh rate is 60Hz but the HW only had enough grunt to render at 59Hz, then, with double buffering, you'd drop to 30Hz and the HW would sit idle for nearly 50% of the time.
 
tEd said:
With triple-buffering you need a second backbuffer
Since you may use more storage for the back buffer (extra samples (if you downsample on back->front), or if you define framebuffer as {colour/z/stencil}, etc.), for the purposes of discussing memory consumption it would be clearer calling it eg. a second front buffer imo.
 
What about using a frame limiter? (or is that vsync.... :?: )

I was thinking about Halo PC, and how it has the 30fps option.... that's got to be different from vsync right? After all, you can still change the refresh rate ingame....plus I don't see the frame rate going to 15fps very often during gameplay.
 
Is 5MB considered a big hit in terms of video memory? I mean, at what point do people say "No, that's too big a memory footprint" when it comes to Triple Buffering?
 
it is too big of a hit when it causes you to run out of video ram.


and no Alstrong, vsync acts as a frame limiter, but an acutal frame limiter like in halo is something compleatly different.
 
Simon F said:
cristic said:
Never gave it to much thought,... but what exactly adds the third buffer in to the mix ? I mean double-buffering should be enough to be able to vsync,... or maybe not ... :?
Yes, but with double buffering your rendering rate is tied to some integer fraction of the refresh rate. That is, each frame can only start when one of the buffers is released and so you get an instaneous rendering rate which is one of 1, 1/2, 1/3, 1/4 etc of the refresh rate.

For example, if your refresh rate is 60Hz but the HW only had enough grunt to render at 59Hz, then, with double buffering, you'd drop to 30Hz and the HW would sit idle for nearly 50% of the time.

Thanks a lot! :D
 
when would it be bad to have triple buffering turned on then? :?:

kyleb said:
and no Alstrong, vsync acts as a frame limiter, but an acutal frame limiter like in halo is something compleatly different.

thanks for the clarification :)

now then... I don't understand why game devs don't just use an actual frame limiter to avoid the vsync issues of halving etc the frame rate? :?:

and... I assume that Doom 3 is using the same idea (frame limiter) then with the 60fps cap?
 
Alstrong said:
when would it be bad to have triple buffering turned on then? :?:

I think only when not using vSync (it's pointless than)

Otherwise even at 1600x1200 it's only a 7.3 MB hit - it's not much on todays cards.

For example with 1600x1200 8xAA it's 131.8 MB -> 139.1 MB.
 
Doom 3's physics engine is capped at 60Hz, not its renderer. (Of course, there's no point in rendering faster than the engine updates movement for gameplay. Benchmarking is another matter.)
 
Pete said:
Doom 3's physics engine is capped at 60Hz, not its renderer. (Of course, there's no point in rendering faster than the engine updates movement for gameplay. Benchmarking is another matter.)

oh..... ok. I see. Do you think there'll be an option in D3 similar to the 30fps cap in Halo PC?


Hyp-X said:
I think only when not using vSync (it's pointless than)

Otherwise even at 1600x1200 it's only a 7.3 MB hit - it's not much on todays cards.

For example with 1600x1200 8xAA it's 131.8 MB -> 139.1 MB.


I thought so, thanks :)
 
Quick explaination on why triple buffering is needed:

In order to enable VSYNC with no stalls, you need to have one frame being displayed, one frame being worked on, and one frame that waits for the currently-displayed frame to finish.

With double buffering, if VSYNC is enabled, the card cannot do anything while waiting for the next refresh, so cycles are wasted. With triple buffering, the card can say, "Okay, I finished this one, but I'm not ready to display it yet. I'll set it aside while I work on a third."
 
rainz said:
jvd said:
I actually enjoy tripple buffering and vsync on but hey i'm wierd so don't mind me :)

You never sleep man ? :oops:

RainZ
what the hell is sleep ?

BUt no i don't . I got an hour and a half of sleep today. GOing to try to sleep again for an hour in a few mins
 
Back
Top