From e8b4494fc30ead136194f6d848a575012937969c Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sat, 5 Feb 2022 23:22:07 -0600 Subject: [PATCH] Add an extra buffer for DirectFlip --- app/streaming/video/ffmpeg-renderers/d3d11va.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/streaming/video/ffmpeg-renderers/d3d11va.cpp b/app/streaming/video/ffmpeg-renderers/d3d11va.cpp index c4b849cd..60de1b54 100644 --- a/app/streaming/video/ffmpeg-renderers/d3d11va.cpp +++ b/app/streaming/video/ffmpeg-renderers/d3d11va.cpp @@ -233,11 +233,13 @@ bool D3D11VARenderer::initialize(PDECODER_PARAMETERS params) swapChainDesc.SampleDesc.Count = 1; swapChainDesc.SampleDesc.Quality = 0; swapChainDesc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT; - swapChainDesc.BufferCount = 2; swapChainDesc.Scaling = DXGI_SCALING_STRETCH; swapChainDesc.AlphaMode = DXGI_ALPHA_MODE_UNSPECIFIED; swapChainDesc.Flags = 0; + // 1 front buffer + 1 back buffer + 1 extra for DWM to hold on to for Flip modes + swapChainDesc.BufferCount = 3; + DXGI_SWAP_CHAIN_FULLSCREEN_DESC fullScreenDesc = {}; if (m_Windowed) {