From a05961ab7bba42e7b5a6a2cdd879fc614b0cb0a4 Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Sat, 27 Apr 2024 21:32:23 +0900 Subject: [PATCH] d3d12screencapturesrc: Fix output to non-d3d12 element Configures upload/download flags to memory after write Part-of: --- subprojects/gst-plugins-bad/sys/d3d12/gstd3d12dxgicapture.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12dxgicapture.cpp b/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12dxgicapture.cpp index 6d6b6c6530..1a1ed22c52 100644 --- a/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12dxgicapture.cpp +++ b/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12dxgicapture.cpp @@ -1491,6 +1491,9 @@ gst_d3d12_dxgi_capture_do_capture (GstD3D12DxgiCapture * capture, gst_d3d12_memory_set_external_fence (dmem, priv->shared_fence.Get (), priv->fence_val); + GST_MINI_OBJECT_FLAG_SET (dmem, GST_D3D12_MEMORY_TRANSFER_NEED_DOWNLOAD); + GST_MINI_OBJECT_FLAG_UNSET (dmem, GST_D3D12_MEMORY_TRANSFER_NEED_UPLOAD); + if (draw_mouse && !gst_d3d12_dxgi_capture_draw_mouse (self, buffer, crop_box)) { priv->WaitGPU (); priv->ctx = nullptr;