d3d12screencapturesrc: Fix output to non-d3d12 element

Configures upload/download flags to memory after write

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6749>
This commit is contained in:
Seungha Yang 2024-04-27 21:32:23 +09:00 committed by GStreamer Marge Bot
parent e29655e9ca
commit a05961ab7b

View file

@ -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;