d3d11window: fix DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING swap chain flag for full screen
authorCorentin Damman <c.damman@intopix.com>
Fri, 12 Aug 2022 09:32:45 +0000 (11:32 +0200)
committerCorentin Damman <c.damman@intopix.com>
Fri, 12 Aug 2022 09:35:40 +0000 (09:35 +0000)
Fixes #1372 (regression introduced in 5eeec165)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2866>

subprojects/gst-plugins-bad/sys/d3d11/gstd3d11window.cpp

index cf99a01..58063d3 100644 (file)
@@ -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;