How is the target refresh rate determined in windowed G-Sync?

Talk about NVIDIA G-SYNC, a variable refresh rate (VRR) technology. G-SYNC eliminates stutters, tearing, and reduces input lag. List of G-SYNC Monitors.
User avatar
RealNC
Site Admin
Posts: 3824
Joined: 24 Dec 2013, 18:32
Contact:

Re: How is the target refresh rate determined in windowed G-Sync?

Post by RealNC » 23 May 2024, 08:16

Unless my research on that front is outdated, I believe laptops cannot have a g-sync module (or any scaler module,) since the display is driven directly by the integrated GPU (the Nvidia GPU needs to pass through it) so there's no point in the "compatible" label. They're always shown as "capable."
SteamGitHubStack Overflow
The views and opinions expressed in my posts are my own and do not necessarily reflect the official policy or position of Blur Busters.

PositronCannon
Posts: 9
Joined: 22 May 2024, 05:28

Re: How is the target refresh rate determined in windowed G-Sync?

Post by PositronCannon » 23 May 2024, 08:43

RealNC wrote:
23 May 2024, 08:16
Unless my research on that front is outdated, I believe laptops cannot have a g-sync module (or any scaler module,) since the display is driven directly by the integrated GPU (the Nvidia GPU needs to pass through it) so there's no point in the "compatible" label. They're always shown as "capable."
As far as I know, that's only the case for laptops without a MUX switch. With a MUX switch, you can choose which GPU you want to be connected to the display, and in my case I've always had it set to exclusively use the Nvidia GPU, so the iGPU is inactive and not a part of the display process. See this comment: https://www.reddit.com/r/GamingLaptops/ ... h/h28c75v/

Still, it is entirely possible that even with a directly connected dGPU there could be some differences between how G-Sync works in laptops regardless, or even specific models. Who knows really.

PositronCannon
Posts: 9
Joined: 22 May 2024, 05:28

Re: How is the target refresh rate determined in windowed G-Sync?

Post by PositronCannon » 08 Jun 2024, 10:22

I took the chance since I was getting a new SSD to go ahead and install W10 on it, just to test this behavior as that was the only variable I had left (that I can actually control). But no luck, it's the exact same behavior as on W11. I am now officially out of ideas, and can only assume it's some quirk specific to how this laptop handles G-Sync. Oh well, setting refresh rate and v-sync type manually per game it is then...

Luviaz
Posts: 19
Joined: 07 Apr 2024, 16:34

Re: How is the target refresh rate determined in windowed G-Sync?

Post by Luviaz » 22 Jun 2024, 06:16

This is somewhat irrelevant and extensive to the thread but Gsync works with Windowed app? I don't use Gsync but Freesync, and Freesync only works with 3D apps which occupied the whole screen, be it Fullscreen and Borderless Fullscreen. I thought that is the way VRR works and assume Gsync to be the same.
How the hell can VRR works with a windowed app? That sounds impossible to me. What would happen if I open 2 windowed games with 2 different arbitrary frame rate ?

User avatar
RealNC
Site Admin
Posts: 3824
Joined: 24 Dec 2013, 18:32
Contact:

Re: How is the target refresh rate determined in windowed G-Sync?

Post by RealNC » 22 Jun 2024, 06:41

Luviaz wrote:
22 Jun 2024, 06:16
This is somewhat irrelevant and extensive to the thread but Gsync works with Windowed app? I don't use Gsync but Freesync, and Freesync only works with 3D apps which occupied the whole screen, be it Fullscreen and Borderless Fullscreen. I thought that is the way VRR works and assume Gsync to be the same.
How the hell can VRR works with a windowed app? That sounds impossible to me.
Games that use independent flip presentation (https://devblogs.microsoft.com/directx/dxgi-flip-model/) now work in windowed mode with both freesync and g-sync through a feature called "multiplane overlay" ("MPO" for short.) They don't need the windowed mode g-sync option with nvidia anymore. They are treated like fullscreen due to MPO. DX12 games behave like this by default. Some DX11 games do while others don't.

The windowed mode g-sync option works even with those games that don't use independent flip, but it's a hack. The Nvidia driver injects itself into the Windows DWM and takes over frame presentation. It has some issues, but generally it works OK.
What would happen if I open 2 windowed games with 2 different arbitrary frame rate ?
The window that has input focus controls VRR.
SteamGitHubStack Overflow
The views and opinions expressed in my posts are my own and do not necessarily reflect the official policy or position of Blur Busters.

Luviaz
Posts: 19
Joined: 07 Apr 2024, 16:34

Re: How is the target refresh rate determined in windowed G-Sync?

Post by Luviaz » 22 Jun 2024, 11:21

Games that use independent flip presentation (https://devblogs.microsoft.com/directx/dxgi-flip-model/) now work in windowed mode with both freesync and g-sync through a feature called "multiplane overlay" ("MPO" for short.) They don't need the windowed mode g-sync option with nvidia anymore. They are treated like fullscreen due to MPO. DX12 games behave like this by default. Some DX11 games do while others don't.

The windowed mode g-sync option works even with those games that don't use independent flip, but it's a hack. The Nvidia driver injects itself into the Windows DWM and takes over frame presentation. It has some issues, but generally it works OK.
I'm aware of MPO and the optimized windowed games option in W11. Essentially, if I understand it correctly, takes windowed DX11 games and has them run in flip presentation. However, i thought that flip model thing was only beneficial for latency and has nothing to do with windowed VRR support. In my experience, DX11 games, running windowed, and using Hardware: Independent Flip, which according to Special K wiki is the most preferable flip model, still doesn't work with Freesync. My indication was the monitor OSD, the screen was refreshing at max refresh rate regardless of the windowed game frame rate. Maybe it's a Freesync thing, Freesync was never stated to work with windowed games, nor there's windowed VRR option like NVIDIA Gsync.

While you at it, i have recently came across some random Microsoft documentation revolving around this flip model stuff:
Specifically this https://learn.microsoft.com/en-us/windo ... in-present
also this https://learn.microsoft.com/pl-pl/windo ... -overviews
which mention something about a flag called DXGI_PRESENT_ALLOW_TEARING for VRR support
Variable refresh rate displays
It is a requirement of variable refresh rate displays that tearing is enabled. The CheckFeatureSupport method can be used to determine if this feature is available, and to set the required flags refer to the descriptions of DXGI_PRESENT_ALLOW_TEARING and DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING, and Variable refresh rate displays.
Variable refresh rate displays
Variable refresh rate displays require tearing to be enabled, this is also known as "vsync-off" support.
What does it mean by Allow tearing and Vsync off support ? Is VRR requires app to be programmed certain way to support it ? Far as I know Freesync works with even the most ancient DX9 games that i play, they just need to be configured in Fullscreen or Fullscreen Borderless.

User avatar
RealNC
Site Admin
Posts: 3824
Joined: 24 Dec 2013, 18:32
Contact:

Re: How is the target refresh rate determined in windowed G-Sync?

Post by RealNC » 03 Jul 2024, 11:17

Luviaz wrote:
22 Jun 2024, 11:21
Variable refresh rate displays
Variable refresh rate displays require tearing to be enabled, this is also known as "vsync-off" support.
What does it mean by Allow tearing and Vsync off support ? Is VRR requires app to be programmed certain way to support it ? Far as I know Freesync works with even the most ancient DX9 games that i play, they just need to be configured in Fullscreen or Fullscreen Borderless.
I don't know about freesync, but DX9 windowed (borderless or not) definitely does not work with g-sync. Neither does DX11, unless the game configures the swapchain correctly. This is on W10. On W11, DX10 and DX11 games get a reconfigured swapchain by the OS:

https://support.microsoft.com/en-us/win ... 389e535952
SteamGitHubStack Overflow
The views and opinions expressed in my posts are my own and do not necessarily reflect the official policy or position of Blur Busters.

User avatar
Chief Blur Buster
Site Admin
Posts: 11775
Joined: 05 Dec 2013, 15:44
Location: Toronto / Hamilton, Ontario, Canada
Contact:

Re: How is the target refresh rate determined in windowed G-Sync?

Post by Chief Blur Buster » 03 Jul 2024, 14:47

Technical explanation
For the old "use VSYNC OFF in game settings, for a VRR display" technique (disambiguation)

Variable refresh rate needs VSYNC OFF. Which will tear if VRR is turned off, but VRR will not tear (if the drivers are configured correctly).

Old games were not designed with VRR In mind, so the method to enable VRR was to use VSYNC OFF in the game, then force the drivers to do VRR (even if it's VRR + VSYNC ON). So game engine does VSYNC OFF but the drivers does VRR + VSYNC ON. That produces good quality VRR for games created before VRR, including the original Source engine.

So you don't see tearing, even though you intentionally enable it in the engine, because it was the method of making an old pre-VRR engine to be VRR compatible, as VRR drivers will visually convert the tearing-settings to proper VRR-settings. The framerate needs to organically breathe natively (and that's why VSYNC OFF), to allow VRR to work. VSYNC ON in a game engine often assumes fixed frame rate and/or fixed refresh rate, creating problems for VRR-compatible organic dynamic framepacing.

That is why historically it was "Force VSYNC OFF in the game settings, and Force VSYNC ON + VRR in driver settings". And full screen exclusive used to be mandatory, and is still much more reliable (especially with multimonitors and different-Hz interference). But newer displays, newer operating systems, and newer drivers, will (sometimes/usually) let you do it in a windowed game.

Confusing, but at least now you know the legacy reason why!

Currently, things are more automatically configuring with latest drivers and several newer games at default settings.

So it is no longer always universally mandatory to do the diametrically opposed VSYNC ON/OFF trick.

...until you run an old engined game, then this trick rescues you...
Head of Blur Busters - BlurBusters.com | TestUFO.com | Follow @BlurBusters on Twitter

Image
Forum Rules wrote:  1. Rule #1: Be Nice. This is published forum rule #1. Even To Newbies & People You Disagree With!
  2. Please report rule violations If you see a post that violates forum rules, then report the post.
  3. ALWAYS respect indie testers here. See how indies are bootstrapping Blur Busters research!

Post Reply