PDA

View Full Version : Triple Buffer with VSync Off


Kaguya
05-19-06, 09:49 AM
I did a search but couldn't find anything useful, or had too many hits to find what I'm interested in.

I always game with VSync Off. I don't mind tearing... but someone mentioned to me (which I cannot confirm) that if I turn Triple Buffering on anyway, I'll still get a performance boost?

Additionally, someone said you could get less tearing with Triple Buffering and VSync Off, but I couldn't see how this would be possible. Any info would be appreciated. Thanks!

SLippe
05-19-06, 09:55 AM
It's always been my understanding TB only works with VS on.

jolle
05-19-06, 10:00 AM
I think Ive read TB can reduce tearing with Vsync OFF aswell.
Im not really sure on that, but I think it works without Vsync aswell, allocating a third framebuffer shouldnt be affected by Vsync, but then again I dont really know.

Kaguya
05-19-06, 12:06 PM
If I have VSync Off though, I would expect any additional performance (if there is any) to be rather small with TB on I would expect? Additionally, I was wondering whether TB could actually reduce performance on rare occasions the same way CPU prediction can cost cycles?

If TB causes frames to be rendered before you see them, it must be guessing where you're going? If it guesses wrong, wouldn't it have to drop that frame and start over?

Also, how much memory could I be using with TB? If I have VSync off, I'm probably better using my memory for AA and Textures?

Quick420
05-19-06, 01:10 PM
I especially liked this part:D

If TB causes frames to be rendered before you see them, it must be guessing where you're going? If it guesses wrong, wouldn't it have to drop that frame and start over?

Made my afternoon (nana2) (nana2) (nana2)

CaptNKILL
05-19-06, 01:17 PM
Triple Buffering uses more memory... I cant think of how much (percentage) off the top of my head, but I know that if it isnt necessary you should probably leave it off to conserve some video memory.

That said, with a 512Mb video card I usually turn it on unless I know the game uses a massive amount of video memory already.

Here are some helpful wikis:
http://en.wikipedia.org/wiki/Triple_Buffering
http://en.wikipedia.org/wiki/Double_buffering

Wikipedia is deffinitely the best source of computer related info like this :)

jolle
05-19-06, 01:57 PM
Triple Buffering uses more memory... I cant think of how much (percentage) off the top of my head,
Spose that depends on what resolution you use, since thats the size of the image the third framebuffer is created to hold.

weevil
05-19-06, 04:08 PM
http://www.nvnews.net/vbulletin/showthread.php?t=70339

EverGreen
05-19-06, 04:36 PM
Nhancer can do this 4 you, within you can set Triple buffering on.
I've seen some improvement with SiN Emerenge Episodes, even when i did do set Force DXT1 (openGL) to Force DXT3 i have little improvements noticed...

Kaguya
05-19-06, 06:15 PM
Xaxly24: I'm glad my ignorance made your day, and that rather than providing me with any useful information, you just laughed. Good show ;)

To the rest, thanks! I only have 256meg cards and game at 1680x1050, so I don't think TB is worthwhile since I keep VSync off... just had someone tell me it could still boost performance, but I've only ever used it with VSync on.

jolle
05-19-06, 07:01 PM
Nhancer can do this 4 you, within you can set Triple buffering on.
I've seen some improvement with SiN Emerenge Episodes, even when i did do set Force DXT1 (openGL) to Force DXT3 i have little improvements noticed...
Isnt Nhancer using the same setting found in the driver? which is OpenGL only.
DXTweaker can force it on in Direct3d, or ATT for ATi users.

Slammin
05-19-06, 09:41 PM
I wonder if TB does the same as the 'Max frames to render ahead'? I guess to test, I could enable TB and set Max frames to render ahead to 0. I already know that setting Max frames to 0 kills performance, but I never tried it with TB enabled. Will let you know.

By the way, I think you have to install Coolbits to get the Max frames button.

edit: Just checked. TB has no effect on my Aquamark3 score. Also, setting Max frames to render ahead to 0 drops my Aquamark3 score from 118k to 108k with or without TB.

Greg
05-20-06, 12:56 AM
...I always game with VSync Off. I don't mind tearing... but someone mentioned to me (which I cannot confirm) that if I turn Triple Buffering on anyway, I'll still get a performance boost?

Additionally, someone said you could get less tearing with Triple Buffering and VSync Off, but I couldn't see how this would be possible. Any info would be appreciated. Thanks!
Tripple buffering always adds a performance and memory overhead, so it will not speed anything up (with VSync off). VSync will likely slow you down and that is the single reason for enabling tripple buffer. With VSync off, you will get tearing of course, enabling tripple buffer will not reduce tearing. The frame rate and type of movement will effect the visual effect of tearing. Higher frame rates may show multiple tears in the one image, slower frame rates may show fewer or intermitent tears. (I suppose you could say that turning tripple buffer on without vsync could slow the frame rate and reduce tearing! but realisticaly, the performance reduction is minimal. The cost of exra memory for the buffer can be no laughing matter at high resolutions.)


I wonder if TB does the same as the 'Max frames to render ahead'? I guess to test, I could enable TB and set Max frames to render ahead to 0. I already know that setting Max frames to 0 kills performance, but I never tried it with TB enabled. Will let you know.
Tripple buffer doesn't have the effect of frames rendered ahead. That is a command queue, independant of the frame buffers. There are various ways to prevent the lag effect without changing the frames ahead count in the driver (which is set at the high value of 3 for the sole purpose of increasing benchmark scores, while not going beyond 3 which is the express limit of someone or other.) The recommended way is what Unreal Tournament does, which is to cause a 1 frame dependency without locking or waiting. nVidia has a document on it.

By the way, the reason we stop at tripple buffer instead of quad buffer or higher, is that extra buffers do not help. Also, with frame command queueing, beyond 2 or 3 frames introduces too much lag to help performance.

Kaguya
05-20-06, 10:57 AM
Thanks Greg! That's exactly what I thought the use of TB was for (increase fps when using VSync) ... but some people on another forum thought I was wrong... I may not have understood the actual technical process that TB uses, but I was right in when to (and not to) use it.

Slammin, I've always wondered about frames rendered ahead too... It's neat that you see a performance loss in benchmarking with 0 when I know I've read some posts that say setting it to 0 or 2 is best (Quake 4 people say 0 reduces mouse lag, and the Forceware TweakGuide says 2).

Greg
05-20-06, 07:49 PM
I should probably say that tripple buffer *could* have the effect of 'frames to render ahead' of 1 as the 3 buffers represent 1=displayed 2=waiting for screen 3=drawing. Realistically this is not the case, in fact enabling VSync is one way to eliminate input/display lag. With VSync, the waiting buffer only has to wait for less than 1 redraw frame at the most, which is 1/60 sec (60hz) or shorter.

With the 'frames ahead' command queue, you can get the effect (particularly apparent with modern GPU intensive games) where the commands are issued quickly by the CPU, but take a long time to run on the GPU (eg. simple scene, but high resolution with complex shader). The video driver/HW could easily buffer 10's-100's of frames, but these frames take a long time to draw, so 3 buffered frames can take way more than 3 screen refreshes. FarCry and Oblivion come to mind as games with GPU intensive frames (when set to high video settings and running on a lower spec card). Enabling high quality AA is another way to get games to lag. The command queue is just a way to govern how the CPU and GPU work asynchronously.

I would presonally recommend setting the 'frames ahead' to 0 or 1 at the most. Just raise it to 3 when doing comparitive benchmarks. It is fairly pointless to have it high in a real game as is simply raises your FPS in already high FPS scenes, hardly helps your low FPS scenes, and adds input lag all the while.

Renzo
05-22-06, 12:14 AM
Triple Buffering uses more memory... I cant think of how much (percentage) off the top of my head, but I know that if it isnt necessary you should probably leave it off to conserve some video memory.

That said, with a 512Mb video card I usually turn it on unless I know the game uses a massive amount of video memory already.
The memory usage added is 1 rendered frame with color.

In case you use 1600*1200*32 resolution, the basic memory usage with DB only is:

1600*1200*32/8/1024^2 = 7.32MB for single buffer, 14,64MB when double buffered and ~20,14MB with 24bit Z.

So TB vs DB is ~27MB vs ~20MB at 1600*1200*32/24bit Z-buffer. Depending on the app/game/amount of video memory the difference is more or less neglible.

Greg
05-22-06, 04:57 AM
The memory usage added is 1 rendered frame with color.
In case you use 1600*1200*32 resolution, the basic memory usage with DB only is:
1600*1200*32/8/1024^2 = 7.32MB for single buffer, 14,64MB when double buffered and ~20,14MB with 24bit Z.
So TB vs DB is ~27MB vs ~20MB at 1600*1200*32/24bit Z-buffer. Depending on the app/game/amount of video memory the difference is more or less neglible.
That is true. Had 4xAA been enabled however, that 7mb could blow out to 30mb taking the total to ~120mb. Those 512mb cards finally make sense.

squall_leonhart
05-22-06, 05:20 AM
i use TB and high res on 128mbs,.. 256mb is overkill.. hell i can even play Farcry at max settngs on my 5900xt. and thats just by tweaking my agp latency and increasing my apperture

SLippe
05-22-06, 06:04 PM
i use TB and high res on 128mbs,.. 256mb is overkill.. hell i can even play Farcry at max settngs on my 5900xt. and thats just by tweaking my agp latency and increasing my apperture
But at what resolution and with what AA setting? And 256 is not overkill. 512 might be, but it's starting to show promise now.

jolle
05-22-06, 06:34 PM
And 256 is not overkill. 512 might be, but it's starting to show promise now.
It will be until its mainstream enough to be put to good use, IE devs start shipping bigger textures and stuff, which wont happen until enough people have boards with this "overkill" amount of RAM on them, hehe
That is a pretty limiting factor today.. DX10 will help that a bit with Virtualized memory tho.. sweeney brushed on the subject in Jakups interview.