NV_DX_interop : Error 0xc007006e on wglDXRegisterObjectNV

Hi there,

I’m using the GL extension NV_DX_interop to get DirectX rendering results to use it with OpenGL and I’m getting error 0xc007006e when calling wglDXRegisterObjectNV to register a texture.

I searched into the extension documentation and found no details about this error.

I also searched on the Internet to find any details to help me resolve my issue but found nothing.

Anybody on this forum getting any clue to resolve this error ? Someone to help me ?

Thanks a lot,
Regards,

Nicolas

Ever find out what caused this? i have the same

Hello @ethan.rabinowitz! Welcome to the NVIDIA developer forums!

For what it’s worth, the error code is easily deciphered. Even though it is a 32bit value, what counts is the lower WORD, here 006Ewhich translates toERROR_OPEN_FAILED. And that in turn means that the Direct3D device could not be opened.

Maybe that helps? if not, keep in mind that this extension is from 2010 and might be a bit outdated.

Thanks!

FWIW, I’ve seen this error when running on a multi-GPU system where:

  1. The OpenGL context is attached to one GPU, and
  2. The DirectX texture(s) to-be-shared have been created on a different GPU.

Trying to share the DX textures for use within the GL application seems to provoke this failure:

wglDXRegisterObjectNV failed: Error=c007006e

The specific use case where I’ve seen this is when using an OpenGL application to connect to the Varjo runtime (for VR HMD rendering) on system with multiple NVIDIA Quadro GPUs (same model number). The OpenGL app can choose which GPU in a multi-GPU system its GL context should be attached to (assuming Quadros) via NV_gpu_affinity. However, the Varjo compositor seems to always and only attach to the GPU backing the desktop video output marked as PRIMARY when you log into Windows. If the GPU attached to by GL doesn’t match the GPU attached to by the Varjo compositor (which owns the DX textures to be shared), then Varjo runtime init fails with this wglDXRegisterObjectNV failed: Error=c007006e error (within Varjo::GLHelper::getGlTextureFromDxTexture, Varjo::GLSwapChainWrapper::GLSwapChainWrapper).

In this case, the solution of course is to force the OpenGL application to attach to the same GPU that DX application creating the textures to-be-shared has attached to. Then, OpenGL-DirectX texture resource sharing works just fine.

@ethan.rabinowitz, @nicolas.choiset , in case it might be useful.