Jump to content


Photo

Howto enable triple buffering


  • Please log in to reply
38 replies to this topic

#26 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 9102 posts

Posted 22 October 2018 - 09:20 AM

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...._buffer_age.txt


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

http://www.indiedb.c...ds/the-dark-mod

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

#27 duzenko

duzenko

    Advanced Member

  • Active Developer
  • PipPipPip
  • 1814 posts

Posted 22 October 2018 - 09:39 AM

That's *nix only, isn't it?



#28 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 9102 posts

Posted 22 October 2018 - 11:09 AM

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....i/Swap_Interval

 

https://www.khronos....wap_control.txt

 

I wonder if r_swapInterval takes -1 already...


  • Anderson likes this
Please visit TDM's IndieDB site and help promote the mod:

http://www.indiedb.c...ds/the-dark-mod

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

#29 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 9102 posts

Posted 23 October 2018 - 07:59 AM

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.


  • Anderson likes this
Please visit TDM's IndieDB site and help promote the mod:

http://www.indiedb.c...ds/the-dark-mod

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

#30 duzenko

duzenko

    Advanced Member

  • Active Developer
  • PipPipPip
  • 1814 posts

Posted 23 October 2018 - 10:39 AM

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


  • Anderson likes this

#31 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 9102 posts

Posted 23 October 2018 - 02:04 PM

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.


  • Anderson likes this
Please visit TDM's IndieDB site and help promote the mod:

http://www.indiedb.c...ds/the-dark-mod

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

#32 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 9102 posts

Posted 24 October 2018 - 11:56 AM

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.c...ds/the-dark-mod

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

#33 duzenko

duzenko

    Advanced Member

  • Active Developer
  • PipPipPip
  • 1814 posts

Posted 24 October 2018 - 12:07 PM

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.



#34 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 9102 posts

Posted 24 October 2018 - 12:18 PM

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.c...ds/the-dark-mod

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

#35 duzenko

duzenko

    Advanced Member

  • Active Developer
  • PipPipPip
  • 1814 posts

Posted 24 October 2018 - 01:05 PM

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



#36 lowenz

lowenz

    Advanced Member

  • Member
  • PipPipPip
  • 1922 posts

Posted 24 October 2018 - 02:23 PM

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.


#37 lowenz

lowenz

    Advanced Member

  • Member
  • PipPipPip
  • 1922 posts

Posted 24 October 2018 - 02:23 PM

not that I understand what 'real-fullscreen' means

Real-Fullscreen = DWM not handling the situation


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.


#38 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 9102 posts

Posted 31 October 2018 - 11:26 AM

HMM:
 
https://forums.dolph...t-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.


  • Judith likes this
Please visit TDM's IndieDB site and help promote the mod:

http://www.indiedb.c...ds/the-dark-mod

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

#39 duzenko

duzenko

    Advanced Member

  • Active Developer
  • PipPipPip
  • 1814 posts

Posted 31 October 2018 - 11:41 AM

They break things with every "update"

It does not even make sense to try the "recommended approach" any more. If something is broken, it's MS fault by default now and something is now always broken.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users