Jump to content
The Dark Mod Forums

Howto enable triple buffering


Recommended Posts

AFAIK there is no control over triple buffering in OpenGL. The driver decides that.

How do you know that it's not working for you? Are you running TDM in fullscreen or window? What Windows version?

 

Hmmm...

 

https://www.khronos.org/registry/OpenGL/extensions/EXT/GLX_EXT_buffer_age.txt

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to post
Share on other sites

Yeah, looks like it.

 

The only things that can be done are:

 

r_finish 1 (super slow but forces correct buffer management)

 

Adaptive Sync:

 

Recent GL drivers implement a new WGL/GLX extension called EXT_swap_control_tear. This extension brings "adaptive vsync" as featured in modern gaming consoles to the PC.

Adaptive vsync enables v-blank synchronisation when the frame rate is higher than the sync rate, but disables synchronisation when the frame rate drops below the sync rate. Disabling the synchronisation on low frame rates prevents the common problem where the frame rate syncs to a integer fraction of the screen's refresh rate in a complex scene.

Adaptive vsync can be enabled with wglSwapIntervalEXT(-1) or glXSwapIntervalEXT(-1).

 

https://www.khronos.org/opengl/wiki/Swap_Interval

 

https://www.khronos.org/registry/OpenGL/extensions/EXT/WGL_EXT_swap_control.txt

 

I wonder if r_swapInterval takes -1 already...

  • Like 1

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to post
Share on other sites

So I fiddled with this last night and found that I'm not able to properly validate vsync.

 

It seems that my monitor must automatically do some sort of buffering of it's own.

I was not able to get screen tearing no matter how much I punished my FPS and turned off all vsync.

 

It's a crappy little LCD TV that also can be used as a monitor and it has a resolution of 1366 x 768

but it's defacto input resolution is 1080p which it auto-downscales so I'm guessing there's all sorts

of funky DSP manipulation to the HDMI input I'm sending it.

 

Going by FPS alone, both r_swapInterval 1 and -1 cap FPS at 60 but seem to allow it to fall to lower

values without going to 30 FPS automatically... which is apparently what Adaptive Vsync should do.

Disabling in-game vsync in favor of Adaptive Vsync in the driver produces the same result.

 

Someone who has a monitor which exhibits tearing without vsync will need to test r_swapInterval -1.

 

As for me? No vsync needed until I get a new monitor I guess.

  • Like 1

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to post
Share on other sites

So I fiddled with this last night and found that I'm not able to properly validate vsync.

 

It seems that my monitor must automatically do some sort of buffering of it's own.

I was not able to get screen tearing no matter how much I punished my FPS and turned off all vsync.

 

It's a crappy little LCD TV that also can be used as a monitor and it has a resolution of 1366 x 768

but it's defacto input resolution is 1080p which it auto-downscales so I'm guessing there's all sorts

of funky DSP manipulation to the HDMI input I'm sending it.

 

Going by FPS alone, both r_swapInterval 1 and -1 cap FPS at 60 but seem to allow it to fall to lower

values without going to 30 FPS automatically... which is apparently what Adaptive Vsync should do.

Disabling in-game vsync in favor of Adaptive Vsync in the driver produces the same result.

 

Someone who has a monitor which exhibits tearing without vsync will need to test r_swapInterval -1.

 

As for me? No vsync needed until I get a new monitor I guess.

Do you have the triple buffering control in nVidia driver control UI?

Did you try it?

http://i36.tinypic.com/3026r21.png

  • Like 1
Link to post
Share on other sites

I was just trying to check on adaptive sync but I will see what triple buffering does (if I have the option).

 

I feel it will be much the story as above since my monitor appears to be forcing vsync in some fashion

but perhaps performance will get some sorta boost.

  • Like 1

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to post
Share on other sites

Yes, I have the option to set Triple Buffering in an nvidia profile for TDM.

 

(As suspected.) No, I am not able to confirm any type of improvement with it set.

 

All vsync options appear to be useless with my monitor...

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to post
Share on other sites

Yes, I have the option to set Triple Buffering in an nvidia profile for TDM.

 

(As suspected.) No, I am not able to confirm any type of improvement with it set.

 

All vsync options appear to be useless with my monitor...

Could it be something to do with monitor drivers?

Or it's Win10 just overriding everything on the kernel level?

BTW Intel does not allow triple buffering control at all.

Link to post
Share on other sites

I think I installed monitor drivers to fix EDID issues at one point.

 

It's just bizarre, no tearing with vsync disabled.

 

Much better than not being able to fix tearing though.

 

On the Windows 10 theory? It would only make sense if the Desktop is forcing some sort of variable

vsync that allows uncapped FPS and it's treating TDM as a windowed app due to the alt-tab fix?

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to post
Share on other sites
On the Windows 10 theory? It would only make sense if the Desktop is forcing some sort of variable

vsync that allows uncapped FPS and it's treating TDM as a windowed app due to the alt-tab fix?

That would make sense since the current DWM forces double buffering for all 'regular' windows

'Regular' being not 'real-fullscreen' not that I understand what 'real-fullscreen' means

Link to post
Share on other sites

On the Windows 10 theory? It would only make sense if the Desktop is forcing some sort of variable

vsync that allows uncapped FPS and it's treating TDM as a windowed app due to the alt-tab fix?

It's an interesting guess!

Task is not so much to see what no one has yet seen but to think what nobody has yet thought about that which everybody see. - E.S.

Link to post
Share on other sites

HMM:

 

https://forums.dolphin-emu.org/Thread-why-borderless-fullscreen-requires-vsync-to-prevent-screentearing

 

If you are on the latest versions of Windows 10, there was a change to the way fullscreen gaming works. Now, exclusive fullscreen is not truly fullscreen and likewise borderless windowed is no longer always purely running under the desktop compositor.

 

 

 

Now there is something called "fullscreen optimizations" which automatically makes most Direct3D games play in a fake borderless fullscreen mode which is technically still rendered within the desktop compositor but disables the enforced vsync of running within the DWM.

 

 

For people who want the benefit of faster alt tabbing and running media on other screens, but don't want DWM vsync applying to their games causing increased input lag, this is very nice. For people who just want a way to force old school triple buffered vsync via the DWM, it's bad. It now means you have to either tell the application within its own software to run in regular borderless windowed and disable the FSO, or you're basically SOL.

 

 

Unfortunately even the people like myself who were perfectly happy with the limitations and benefits of true exclusive fullscreen, basically are screwed and have no proper fallback to the old fashioned way of rendering to the display. It is pretty much always running under the DWM no matter what you do and it interferes tremendously with things like gsync and vsync.

 

 

TLDR - install Windows 7 and be happy.

  • Like 1

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...