mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 15:27:07 +00:00
d3d12bufferpool: Sync all memory objects on acquire_buffer()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6749>
This commit is contained in:
parent
ae5361b7fa
commit
00924d4820
1 changed files with 6 additions and 3 deletions
|
@ -316,9 +316,12 @@ gst_d3d12_buffer_pool_acquire_buffer (GstBufferPool * pool,
|
|||
if (ret != GST_FLOW_OK)
|
||||
return ret;
|
||||
|
||||
auto mem = (GstD3D12Memory *) gst_buffer_peek_memory (*buffer, 0);
|
||||
GST_MINI_OBJECT_FLAG_UNSET (mem, GST_D3D12_MEMORY_TRANSFER_NEED_UPLOAD);
|
||||
gst_d3d12_memory_sync (mem);
|
||||
guint num_mems = gst_buffer_n_memory (*buffer);
|
||||
for (guint i = 0; i < num_mems; i++) {
|
||||
auto mem = (GstD3D12Memory *) gst_buffer_peek_memory (*buffer, i);
|
||||
GST_MINI_OBJECT_FLAG_UNSET (mem, GST_D3D12_MEMORY_TRANSFER_NEED_UPLOAD);
|
||||
gst_d3d12_memory_sync (mem);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue