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

[ Core ] Stuttering in window mode #729

Open
DLPB2 opened this issue Sep 17, 2024 · 3 comments
Open

[ Core ] Stuttering in window mode #729

DLPB2 opened this issue Sep 17, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request feedback Pending for feedback from the user

Comments

@DLPB2
Copy link

DLPB2 commented Sep 17, 2024

Hi, guys - as a courtesy to the gaming community, I am sharing what I learned about DWM and the need to make sure you are properly implementing the call to dwmflush(). I haven't checked your source, so forgive me if this is already implemented - Doesn't seem many people are to their detriment.

Please see https://forum.cheatengine.org/viewtopic.php?p=5791077#5791077

@DLPB2 DLPB2 added the bug Something isn't working label Sep 17, 2024
@julianxhokaxhiu
Copy link
Owner

Thank you very much for having brought this up. Very interesting topic!

Have you got a video to showcase the before/after? So I can try to reproduce it here and see if it has an impact on our own side as well. Asking because since we use a completely different way to render, might be we have this resolved via bgfx instead of having to patch FFNx ( from the understanding of the API it seems it impacts mainly the DirectX layer ).

Thank you in advance in case. Looking forward to it.

@julianxhokaxhiu julianxhokaxhiu added feedback Pending for feedback from the user enhancement New feature or request and removed bug Something isn't working labels Sep 22, 2024
@julianxhokaxhiu julianxhokaxhiu changed the title Stuttering in window mode [ Core ] Stuttering in window mode Sep 22, 2024
@DLPB2
Copy link
Author

DLPB2 commented Sep 24, 2024

Video before and after won't be much use since that itself adds an issue. But I've definitely proven the fault exists (before would skip at least 3 times during opening credits - it's sometimes subtle. Although not to me because it drives me insane). bgfx needs to be calling dwmflush after swapbuffer.

https://devblogs.microsoft.com/directx/demystifying-full-screen-optimizations/

Here is an official statement that shows they turn it off when borderless fs window - so that would explain OpenGL not having issues in full screen.

"To get back this performance overhead, we enhanced the DWM to recognize when a game is running in a borderless full screen window with no other applications on the screen. "

@julianxhokaxhiu
Copy link
Owner

Thanks for sharing this info. May I ask on which GPUs did you test the fix? I'm trying to gather some info here as I think this behavior doesn't apply on bgfx as we have other type of ways to cap the framerate, but if you uncap it there's no VSYNC in place in any case. If you could share more info on the PC specs you have where you were able to repro this I'd appreciate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feedback Pending for feedback from the user
Projects
None yet
Development

No branches or pull requests

2 participants