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

[Win/Libretro] "Delay Frame Swapping ON" + "Threaded rendering OFF" make some games stutter heavily in DX11/GL #1615

Open
Immersion95 opened this issue Aug 26, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@Immersion95
Copy link
Contributor

Immersion95 commented Aug 26, 2024

"Delay Frame Swapping" is now default as it's the intended behavior of the Dreamcast.

Delay Frame Swapping. originally flycast (and reicast) would display the frame as soon as it is rendered. However, on real hardware the frame is only displayed at the next vblank interrupt. This is what Delay Frame Swapping does, and it should be on by default.

It make some games stutter heavily, it is reproducible across all of of my computer setups (Windows 11/Latest RA/GL/DX11/Ryzen 7600/AMD 7900 XTX/Nvidia 4070 Super). Only Vulkan is perfect.

It's a stutter at a regular interval, as if the FPS synchronization is off. It doesn't seem to be a problem with performance.

Games that are stutttering : Metal Slug 6, Dolphin Blue, SFIII Double Impact. Need to test other games too

Example : Dolphin Blue - Shot

With Threaded rendering OFF :

  • 2 frames without Delay Frame Swapping - Great but hacky as it's not what is supposed to be - Smooth FPS
  • 3 frames with Delay Frame Swapping - Accurate and exactly as intended on real hardware - Stutter

With Threaded rendering ON :

  • 4 frames without Delay Frame Swapping - 2 more frames than with Single core rendering - Smooth FPS
  • 4 frames with Delay Frame Swapping - Same input lag with or without Delay Frame Swapping - Smooth FPS

The accurate behavior should be with Delay Frame Swapping, unfortunately it's only completely smooth with Threaded rendering ON and it adds input lag.

  1. Related issue regarding threaded rendering adding input lag : Threaded rendering adds a frame of input lag libretro/flycast#738
  2. Related issue regarding Delay Frame Swapping adding stuttering : https://forums.libretro.com/t/flycast-delay-frame-swapping/28521
@Immersion95 Immersion95 added the bug Something isn't working label Aug 26, 2024
Repository owner deleted a comment Aug 26, 2024
@flyinghead
Copy link
Owner

Nice try vatnik:
image

@mfigueirido
Copy link

I have similar issues in many games in RA.
Threaded rendering OFF and Delay Frame Swapping OFF still produce stuttering for me.
Threaded rendering ON produces audio stalls in RA so the only way to get clean audio is this one documented here:
#1062 (comment)

Repository owner deleted a comment Aug 26, 2024
Repository owner deleted a comment Aug 26, 2024
@Immersion95 Immersion95 changed the title [Win/RA] "Delay Frame Swapping ON" + "Threaded rendering OFF" make some games stutter heavily [Win/RA] "Delay Frame Swapping ON" + "Threaded rendering OFF" make Atomiswave games stutter heavily Aug 26, 2024
@Immersion95 Immersion95 changed the title [Win/RA] "Delay Frame Swapping ON" + "Threaded rendering OFF" make Atomiswave games stutter heavily [Win/RA] "Delay Frame Swapping ON" + "Threaded rendering OFF" make some games stutter heavily Aug 26, 2024
@Immersion95 Immersion95 changed the title [Win/RA] "Delay Frame Swapping ON" + "Threaded rendering OFF" make some games stutter heavily [Win/Libretro] "Delay Frame Swapping ON" + "Threaded rendering OFF" make some games stutter heavily Aug 26, 2024
@Immersion95 Immersion95 changed the title [Win/Libretro] "Delay Frame Swapping ON" + "Threaded rendering OFF" make some games stutter heavily [Win/Libretro] "Delay Frame Swapping ON" + "Threaded rendering OFF" make some games stutter heavily in DX11/GL Aug 26, 2024
@Immersion95
Copy link
Contributor Author

This only affects DX11/GL, it's totally smooth in Vulkan. It would be great if this was smooth across all backends though :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants
@flyinghead @mfigueirido @Immersion95 and others