Stefan Dösinger (@stefan) commented about dlls/mfmediaengine/tests/mfmediaengine.c:
+ hr = IMFMediaEngine_OnVideoStreamTick(engine, &presentation_time); + ok(hr == S_OK || hr == S_FALSE, "Unexpected hr %#lx.\n", hr); /* Returns S_FALSE when no frame is ready. */ + + if (hr == S_OK) + { + hr = IMFMediaEngine_TransferVideoFrame(engine, (IUnknown *)video_texture, &video_norm_rect, &rect, &border_color); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + } + + ok(!enable_print, "ID3D11Device_GetImmediateContext\n"); + ID3D11Device_GetImmediateContext(d3d11_dev, &d3d11_dev_ctx); + + /* Map and unmap to wait for the Draw calls in MF to have finished. */ + hr = ID3D11DeviceContext_Map(d3d11_dev_ctx, (ID3D11Resource *)video_texture, 0, D3D11_MAP_READ, 0, &mapped_subresource); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); + ID3D11DeviceContext_Unmap(d3d11_dev_ctx, (ID3D11Resource *)video_texture, 0); If map() synchronizes vs MF properly, why do draws not do that? Now that you are mapping the texture anyway you could check the mapped data for expected contents.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/1046#note_10530