bilsou
bilsou
Yep found the issue, I was creating manually my d3d device and from there my swapchain all its directx resources. I can't do that if I want to query directly...
void present(CONTEXT\* renderer, MediaSample2D^ sample) { CHKNULL(sample); ``` // Create a shareable texture with the display DX device D3D11_TEXTURE2D_DESC td; renderer->renderTarget->GetDesc(&td); ComPtr texture; CHK(renderer->d3dDevice->CreateTexture2D(&td, nullptr, &texture)); renderer->d3dContext->CopyResource(texture.Get(), renderer->renderTarget.Get()); // Get...
Forgot to add the safety bit with the mutex : ``` // open that texture in the camera DX device m_cameraDevice->OpenSharedResource(sharedHandle, __uuidof(ID3D11Texture2D), (LPVOID*)&texture); ComPtr keyedMutex; texture.As(&keyedMutex); UINT acqKey = 0;...
Coming back after trying for hours and still don't know why my shared resource got corrupted.. Here is my final code: void present(CONTEXT\* renderer, MediaSample2D^ sample) { CHKNULL(sample); ``` if...
Thanks for your sample. I indeed understood that the issue was calling CopySubresourceRegion on textures created from 2 different devices but that's why I thought the OpenSharedResource was coming into...
Sorry I might not have been clear on my previous comment (shame one me) that I understood everything was basically shared through this handle got from GetShareHandle and that is...
It was all about the D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX descriptor. If used on both the render target and the shared texture created from it, it just doesn't work and gives black textures. The...
Sorry for the really late answer, updated your new code a month ago, works perfectly now thanks a lot !
@4brunu Would be really useful to have it done on the Scala side automatically. Any update ?
I tried to look at it once but it wasn't so straightforward modifying the Scala sources, there is no "official" way of extending the generator. I reckon looking at what...