File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
app/streaming/video/ffmpeg-renderers Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -661,11 +661,16 @@ void PlVkRenderer::waitToRender()
661661 return ;
662662 }
663663
664+ #ifndef Q_OS_WIN32
664665 // With libplacebo's Vulkan backend, all swap_buffers does is wait for queued
665666 // presents to finish. This happens to be exactly what we want to do here, since
666667 // it lets us wait to select a queued frame for rendering until we know that we
667668 // can present without blocking in renderFrame().
669+ //
670+ // NB: This seems to cause performance problems with the Windows display stack
671+ // (particularly on Nvidia) so we will only do this for non-Windows platforms.
668672 pl_swapchain_swap_buffers (m_Swapchain);
673+ #endif
669674
670675 // Handle the swapchain being resized
671676 int vkDrawableW, vkDrawableH;
@@ -818,6 +823,12 @@ void PlVkRenderer::renderFrame(AVFrame *frame)
818823 goto UnmapExit;
819824 }
820825
826+ #ifdef Q_OS_WIN32
827+ // On Windows, we swap buffers here instead of waitToRender()
828+ // to avoid some performance problems on Nvidia GPUs.
829+ pl_swapchain_swap_buffers (m_Swapchain);
830+ #endif
831+
821832UnmapExit:
822833 // Delete any textures that need to be destroyed
823834 for (pl_tex texture : texturesToDestroy) {
You can’t perform that action at this time.
0 commit comments