Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GS: Improve vsync mode selection #11291

Merged
merged 3 commits into from
May 25, 2024
Merged

Conversation

stenzek
Copy link
Member

@stenzek stenzek commented May 23, 2024

Description of Changes

All games use mailbox/triple buffering. Except when you enable sync to host refresh, in which case FIFO/double buffering is used.

This means vsync enabled will ever tear, but at the same time, never drop to 30fps on a missed frame due to frame rate differences. Unless you're using OpenGL, because that doesn't support triple buffering, in which case, too bad.

To have the "best of both worlds", you should enable vsync and sync to host refresh. Previously, this resulted in additional input lag, since the host vsync would drive the EE frame timing. Now, this behaviour is disabled by default, unless you enable "Use Host VSync Timing".

Rationale behind Changes

Trying to make both stutter-wanters and tear-wanters happy.

Suggested Testing Steps

Hammer vsync options.

@ichee
Copy link
Contributor

ichee commented May 24, 2024

Tested all the vsync options.

Vsync alone stutters.

Vsync and sync to host runs fine and without running at unlimited framerate, same as vsync alone on previous builds.

Vsync, sync to host, and use host timing works fine as well, albeit with higher input lag as noted.

So all in working order.

Just in case it was missed before, setting the nvidia control panel option Vulkan/OpenGL present method to
Prefer layered on DXGI Swapchain allows vsync only to work just fine without stutter, tearing, or added input lag in fullscreen.

Thanks.

@stenzek stenzek force-pushed the vsync-for-the-last-time branch 6 times, most recently from 2e44e05 to 7cf5ca7 Compare May 24, 2024 12:35
@stenzek
Copy link
Member Author

stenzek commented May 24, 2024

Added manual presentation throttling, i.e. you can toggle the frame limiter on/off without recreating the swap chain.
AMD will fall back to FIFO since mailbox isn't supported.

@MrPillze
Copy link

i have always found on a non vrr screen turning vsync off in everything and only using the vsync option in the nvidia control panal has yielded the best results for me, would there be a preferred way to use vsync and other options in the emulator now or? sorry if this is not the place to ask :)

@stenzek
Copy link
Member Author

stenzek commented May 24, 2024

Please use the discord server or forums for support, this is not the place.

All games use mailbox/triple buffering. Except when you enable sync to
host refresh, in which case FIFO/double buffering is used.

This means vsync enabled will ever tear, but at the same time, never
drop to 30fps on a missed frame due to frame rate differences.

To have the "best of both worlds", you should enable vsync and sync to
host refresh. Previously, this resulted in additional input lag, since
the host vsync would drive the EE frame timing. Now, this behaviour is
disabled by default, unless you enable "Use Host VSync Timing".
@stenzek stenzek merged commit 3928014 into PCSX2:master May 25, 2024
12 checks passed
@stenzek stenzek deleted the vsync-for-the-last-time branch May 25, 2024 04:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants