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

(Vulkan) Prefer IMMEDIATE mode without vsync #17009

Merged
merged 3 commits into from
Sep 17, 2024

Conversation

sonninnos
Copy link
Collaborator

@sonninnos sonninnos commented Sep 17, 2024

Description

Some Vulkan related corrections:

  • Use IMMEDIATE mode if available when vsync is disabled
    • Allows proper tearing and has much less input lag, and thus works properly with external scanline sync
  • Add readable debug logging for supported and active presentation modes
  • Impose minimum and maximum values for max swapchains, so that program won't freeze if cfg has been edited manually to below allowed 2, and also do the same for gl hard sync frames while at it
  • Improve current fastforward frameskip Vulkan hack by not disabling it completely
    • Allows proper fastforward rates with external frame limiting without being totally choppy

Current present mode picking method works only if present modes come in specific order, and they seem to be random based on platform. Here on Windows the order is so that currently MAILBOX will be picked first, which is bad for non-vsync:

[DEBUG] [Vulkan]: Swapchain supports present mode: FIFO.
[DEBUG] [Vulkan]: Swapchain supports present mode: FIFO_RELAXED.
[DEBUG] [Vulkan]: Swapchain supports present mode: MAILBOX.
[DEBUG] [Vulkan]: Swapchain supports present mode: IMMEDIATE.

@LibretroAdmin LibretroAdmin merged commit 6713e3b into libretro:master Sep 17, 2024
27 checks passed
@sonninnos sonninnos deleted the vulkan-immediate branch September 17, 2024 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants