From 0d07ff60c92e6c08296d9b1495afb89558b07276 Mon Sep 17 00:00:00 2001 From: Corentin Damman Date: Fri, 12 Aug 2022 11:32:45 +0200 Subject: [PATCH] d3d11window: fix DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING swap chain flag for full screen Fixes #1372 (regression introduced in 5eeec165) Part-of: --- subprojects/gst-plugins-bad/sys/d3d11/gstd3d11window.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11window.cpp b/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11window.cpp index cf99a01..58063d3 100644 --- a/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11window.cpp +++ b/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11window.cpp @@ -630,6 +630,11 @@ gst_d3d11_window_prepare_default (GstD3D11Window * window, guint display_width, if (SUCCEEDED (hr) && allow_tearing) window->allow_tearing = allow_tearing; + if (window->allow_tearing) { + GST_DEBUG_OBJECT (window, "device supports tearing"); + swapchain_flags |= DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING; + } + GstD3D11DeviceLockGuard lk (device); window->dxgi_format = chosen_format->dxgi_format; -- 2.7.4