Backends: Dx12: Enable swapchain tearing to eliminate viewports framerate throttling#8965
Backends: Dx12: Enable swapchain tearing to eliminate viewports framerate throttling#8965RT2Code wants to merge 5 commits into
Conversation
|
Thanks for your PR.
|
(For the records, I don't get display refresh rate throttling on my desktop Windows 10 setup.) |
b8f9a75 to
134d20d
Compare
134d20d to
bd00d34
Compare
Correct, and in fact, you made me realize it's also true for the dxgi factory, there's no need to recreate it for each viewport. I applied your suggestions.
Maybe it's specific to Windows 11? When I disable VSync and no support for tearing, my framerate is capped to 144fps, which is my screen refresh rate. |

According to the DXGI documentation, with VSync off and a swapchain using flip swap effects, it is recommended to enable tearing to support displays with variable refresh rate.
Another reason to enable swapchain tearing is that without it, non-fullscreen swapchains are throttled to the display’s refresh rate even with VSync disabled. Enabling tearing removes this limitation and lets viewports run at full framerate.
I used this sample as a reference for this PR.
Please note that fullscreen is not supported yet (no change here, it's already unsupported), that's something I'll fix in a future PR.