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 ?
FWIW, I’ve seen this error when running on a multi-GPU system where:
The OpenGL context is attached to one GPU, and
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.