https://github.com/Microsoft/WPFDXInterop
https://github.com/leadedge/Spout2/tree/master/SpoutSDK/Source
https://github.com/leadedge/Spout2/blob/master/SpoutSDK/Source/SpoutDirectX.cpp
https://github.com/jrmuizel/d3d-tests/blob/master/shared-surface.cc
https://github.com/SlightlyMad/AsyncTextureReader/blob/master/PluginSource/Source/RendererAPI_D3D11.cpp
https://www.gamedev.net/forums/topic/552795-solved-d3d11-and-direct2d/
https://docs.microsoft.com/en-us/windows/desktop/direct3darticles/surface-sharing-between-windows-graphics-apis
https://docs.microsoft.com/zh-cn/windows/desktop/direct3d10/d3d10-graphics-programming-guide-resources-mapping
D3D11_MAP_FLAG_DO_NOT_WAIT
DXGI_ERROR_WAS_STILL_DRAWING
CreateSurfaceQueue
dx 11 interop Synchronization
The command buffer is flushed, thus causing a user/kernel mode switch, in one of four situations, which are as follows.
Present is called.
ID3D10Device::Flush is called.
The command buffer is full; its size is dynamic and is controlled by the Operating System and the graphics driver.
The CPU requires access to the results of a command waiting to execute in the command buffer.
CopyResource
The method is an asynchronous call, which may be added to the command-buffer queue. This attempts to remove pipeline stalls that may occur when copying data.
https://docs.microsoft.com/zh-cn/windows-hardware/drivers/display/mapping-on-deferred-contexts