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

Framerate of Win2D is fixed to lowest framerate when set Variable refresh rate on display settings. #927

Open
Dev-Taehui opened this issue Jul 28, 2023 · 0 comments

Comments

@Dev-Taehui
Copy link

Modern Windows devices have an option of variable refresh rate (a.k.a. VRR). For example, refresh rate of my laptop is from 60Hz to 120Hz. And, it switches automatically on contents (applications)

But, Win2D cannot recognize this VRR feature. It always fixes to lowest refresh rate without other app's display operations.

using (var canvasDrawingSession = canvasSwapChain.CreateDrawingSession(Colors.Black)) {
  // Some Direct2D operations
}
canvasSwapChain.Present(0);

On 60 to 120 Hz display, it seems to run 60fps. But, when I moves my mouse rapidly, Its framerate goes to 120fps because movement of mouse cursor triggered VRR to match refresh rate to pointer movement.

Could it be solved without any user gesture? I set DXGI_PRESENT_ALLOW_TEARING on swap chain creation and present function by modifying Win2D source code directly. (https://www.intel.com/content/www/us/en/developer/articles/technical/enabling-intel-adaptive-sync-with-11th-generation-intel-processor-graphics-and-microsoft.html)

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

No branches or pull requests

1 participant