CUDA interop with D3D12 possible?

Hello,

I’m trying to use CUDA (more specifically, the NVIDIA video codec SDK [url]https://developer.nvidia.com/nvidia-video-codec-sdk[/url]) with D3D12 in an existing application using DirectX 12.
Since there’s no cuD3D12CtxCreate (yet?), I though that I could just use D3D11On12 to get a ID3D11Device that I could pass to cuD3D11CtxCreate.
Sadly, cuD3D11CtxCreate returns CUDA_ERROR_UNKNOWN when called with a ID3D11Device obtained in this manner.

Am I doing something wrong? Is it supposed to work?

I couldn’t find anything about CUDA with D3D12 or D3D11On12 using Google…

Thanks for your help!

1 Like

At the risk of just bumping an old thread, but is there any update on this? Is it possible to use d3d11on12 interop with the nvidia decoder? Or perhaps directly interface with D3D12? APIs like

cudaGraphicsD3D12RegisterResource

are still(?) not there as you would have on D3D11, e.g.:

cudaGraphicsD3D11RegisterResource

Did you checked out the cuda sample simpleD3D12 ? There is a buffer (a set of vertex) sharing between D3D12 and cuda, and it works very well.

I’m trying to make the interop work not with buffers but with texture2D (D3D12) and one of {Tex2D, surface2D, 2D array} in cuda.

I don’t think it’s a good idea to mix D3D11 and D3D12 (except when you update from D3D11 to D3D12); you might want to stick entirely to D3D12.

Hello guys,
im stuck at the same point, i need cudaGraphicsD3D12RegisterResource but it looks still not available.
have you ever found the equivalent for DirectX12?

Thanks.