Details
-
Task
-
Resolution: Done
-
P3: Somewhat important
-
6.4
-
8d93470858 (qt/qtdeclarative/dev) 8d93470858 (qt/tqtc-qtdeclarative/dev)
Description
Currently setting the QSurfaceFormat::swapInterval to 0 is mapped to QRhiSwapChain::NoVSync by both render loops. This is nice but not quite useful for testing and development because it involves modifying the application. Just as we have QSG_NO_DEPTH_BUFFER that affects the default depthBufferSize on the QQuickWindow's QSurfaceFormat (and is taken into account in other ways for non-OpenGL), we should have a QSG_NO_VSYNC that sets the swapInterval to 0 instead of the default 1.
for cross-platform operation both are needed: with OpenGL the swapInterval value from the QSurfaceFormat is what matters and is handled by components in the Qt stack other than QRhi, whereas for non-GL APIs (D3D/Vulkan/Metal) the handling is implemented based on the NoVSync flag directly in the QRhi backends themselves.