-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
Support variable refresh rate display #8022
Comments
I believe @lhecker tried both of these things and documented them in #649. Do you recall, Leonard? This thread may not need to be separate from 649; comments about the behavior and why this may not be in WT’s purview start here: #649 (comment) |
If you have tested and confirmed that this works, we’d love to evaluate it! 😄 |
There's a slight chance that I did something wrong, when I tried to implement Variable Refresh Rate (VRR) support, but I honestly doubt that, since I had full Nvidia G-Sync support locally. But what I said in #649 (comment) basically explains why VRR is the entirely wrong approach for us, a non-game application which composites with the rest of the desktop. If you could tell me how to make Nvidia's drivers stop recognizing this application as one that wants G-Sync I'd gladly implement that on the other hand, because we could then finally close #649. 😄 |
The issue affects other applications when you're using multiple monitors with Discord, Skype, Slack, Twitch, Visual Studio, Youtube etc... you can't use those screens and applications when the Terminal window has focus.
The best solution was using
If it's the same with IDesktopWindowXamlSourceNative as the d3d12 samples IslandWindow::OnSize would need GetFullscreenState: https://github.com/microsoft/DirectX-Graphics-Samples/blob/master/Samples/Desktop/D3D12Fullscreen/src/D3D12Fullscreen.cpp#L636-L646 The sample passes the flag to Present() without vsync here:
Yep, we can close it 👍 |
Correct me if I'm wrong, please: wouldn't the correct fix be G-Sync being disabled for all affected MS Store apps (without affecting games)? Either via the app communicating to the driver that it is not a game and will not benefit from variable refresh rate, or the driver detecting through profiles or algorithms that this is the case. The behaviour in that case with a 59/60 fps game (internal limiter) and a 144 Hz Windows Terminal (Nvidia profile disabling G-Sync for Terminal): |
Yep that's exactly what I tried to convey @Luckz. |
The Windows Terminal is missing a flag required for variable refresh rate display support which ends up directly causing two additional bugs in the dx renderer.
The first issue is the missing flags to enable support for variable refresh rate displays (for example 144hz monitors). This is documented on MSDN here (includes source code sample): https://docs.microsoft.com/en-us/windows/win32/direct3ddxgi/variable-refresh-rate-displays
The second issue is the terminal renderer passing 1 when calling Present() forcing vsync for the surfaces both here:
terminal/src/renderer/dx/DxRenderer.cpp
Line 1331 in 7a75e50
and here:
terminal/src/renderer/dx/DxRenderer.cpp
Line 1352 in 7a75e50
Must to be changed from 1 to 0.
Those two changes are needed for fixing both #649 and #7147 and mentioned in the nvidia documentation:
The text was updated successfully, but these errors were encountered: