Closed jmoguillansky-gpsw closed 3 years ago
D3D12 does support opening non-NT handles. However, be aware that once you're going cross-device, you need to worry about synchronization, either with keyed mutexes or fences.
You can use D3D11On12 with the ID3D11On12Device2
methods (UnwrapUnderlyingResource
and ReturnUnderlyingResource
) to avoid having to use a second device. These operations allow you to synchronize to a specific queue on the same D3D12 device.
Perfect, thanks!
Hi, I'm trying to enable direct mapping of decoded buffers from Media Foundation as DirectX 12 textures. The problem is MediaFoundation doesn't support DirectX 12.
I tried two approaches: 1) Create a DirectX 11 device. Use CreateSharedHandle to create a shared NT handle from the IMFDXGIBuffer. I get an error "Parameter is incorrect".
2) Create a D3D11On12Device. Use CreateSharedHandle to create a shared NT handle from the IMFDXGIBuffer. I also get the same error "Parameter is incorrect".
My question is: how do we enable interop between MediaFoundation and DirectX 12? It seems that the IMFDXGIBuffer is not an NT handle while DirectX 12 requires an "NT handle"?
I also set MF_SA_D3D11_SHARED to true. It doesn't seem that Media Foundation provides any option to allocate an "NT handle"?
Please advise.