2021-01-12 07:49

NVidia Ansel is not supported


first of all, thanks for your great tool! renderDoc is amazing! It is my favorite tool for debug gpu. Far better than nsight or pix.

I have updated renderDoc to the version 1.2. When I launch my game on nVidia with in-App renderDoc I have a warning during the hook of nvapi_QueryInterface_hook(...) " d3d11_hooks.cpp( 426) - Warning - NvAPI disabled: Returning NULL for nvapi_QueryInterface(d451e834) " After this message I lost my device and the game crash.


The problem probably come from my configuration, I have 2 gpus in my mobo. one is an Amd gpu, and the other one is an nvidia. If I launch the game with renderDoc on my AMD, I don't have any problem. Probably the AMD interfer with nVidia during hooking.

I have found a workaround, I have modified the method lgn 426. But you will probably do a better 'clean' fix.

nvapi_QueryInterface_hook(...) { ... RDCWARN("NvAPI disabled: Returning NULL for nvapi_QueryInterface(%x)", ID); return real; // I don't return null. }

Repro steps

1) have 2 video cards (AMD & nVidia) 2) launch our application with in-application renderDoc 3) wait renderDoc hooking and lost your device.


  • 2 gpus (AMD & nVidia)
  • application launch in D3D11
  • renderDoc in-Application dll version 1.2

once again, thanks for your works. -TTV-


  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答


  • weixin_39531688 weixin_39531688 3月前

    Yes nvapi is blocked because it's not supported for capture and replay. It can lead to corrupted captures due to missing commands/semantics, and might lead to crashes in some cases.

    Can you explain what the actual crash is? RenderDoc blocking the nvapi_QueryInterface call will just cause the function to return NVAPI_NO_IMPLEMENTATION which needs to be handled by the calling code with a fallback path. In itself it's not a problem and shouldn't crash.

    点赞 评论 复制链接分享
  • weixin_39715348 weixin_39715348 3月前

    hi Baldurk,

    The crash is internal in the driver. This is my output log: RDOC 005176: [05:59:02] d3d11_hooks.cpp( 426) - Warning - NvAPI disabled: Returning NULL for nvapi_QueryInterface(d451e834) RDOC 005176: [05:59:02] d3d11_hooks.cpp( 426) - Warning - NvAPI disabled: Returning NULL for nvapi_QueryInterface(6c2d048c) D3D11: Removing Device.

    Just before the swapchain::present(), I have added some code to check the device: void renderPresent(...) { HRESULT hr = g_nativeGPUDevice->GetDeviceRemovedReason(); my hresult is equal to DXGI_ERROR_DRIVER_INTERNAL_ERROR.

    I haven't stepped yet in renderDoc code to try to catch when I lost my device. I will try to givve you better investigation later.

    Thanks again for your great work! -TTV-

    点赞 评论 复制链接分享
  • weixin_39531688 weixin_39531688 3月前

    Is your code correctly handling the 'no implementation' error above from nvapi functions? If you call nvapi functions and don't check the error code, then e.g. shader extensions that aren't properly handled may cause GPU/driver problems as the bytecode isn't intended to be run normally.

    To debug this I would need a reproducible test case that shows the crash, as device removed can be caused by a lot of things.

    点赞 评论 复制链接分享
  • weixin_39715348 weixin_39715348 3月前

    Hi baldurk,

    I have investigated further the crash. I lost the device inside the nvCamera64.dll Our game is hooked by Ansel and with renderDoc disabling nvAPI I lost the device and crash. If I disable Ansel, in NvCameraConfiguration.exe, I don't crash anymore.

    I will probably keep my hack in renderDoc so I don't have to disbable/enable Ansel each time I want use renderDoc.

    Thanks anyway! renderDoc is awesome!

    点赞 评论 复制链接分享
  • weixin_39531688 weixin_39531688 3月前

    Yeh I guess perhaps Ansel relies on nvapi and will probably do its own separate support check then assume it's not blocked/hooked.

    RenderDoc won't support Ansel and I'm not even sure the API for it is public for me to intercept & block it too.

    点赞 评论 复制链接分享