Skip to content

Instantly share code, notes, and snippets.

@widberg
Last active October 12, 2025 02:49
Show Gist options
  • Select an option

  • Save widberg/871901996de659bee0587b99fb620ceb to your computer and use it in GitHub Desktop.

Select an option

Save widberg/871901996de659bee0587b99fb620ceb to your computer and use it in GitHub Desktop.
Patch for RenderDoc to fix some errors with NVAPI and AnselSDK. The error can manifest as CreateTexture2D returning DXGI_ERROR_DEVICE_REMOVED due to RenderDoc returning NULL for nvapi interface 0xd451e834 deep in the call stack for Present in an Ansel DLL. (nvapi.dll, nvapi64.dll, AnselSDK32.dll, AnselSDK64.dll)
diff --git a/renderdoc/driver/ihv/nv/nvapi_hooks.cpp b/renderdoc/driver/ihv/nv/nvapi_hooks.cpp
index 0f4e21245..ff046b434 100644
--- a/renderdoc/driver/ihv/nv/nvapi_hooks.cpp
+++ b/renderdoc/driver/ihv/nv/nvapi_hooks.cpp
@@ -610,6 +610,7 @@ private:
WHITELIST_NVAPI(unknown_func, 0xad298d3f);
WHITELIST_NVAPI(unknown_func, 0x33c7358c);
WHITELIST_NVAPI(unknown_func, 0x593e8644);
+ WHITELIST_NVAPI(unknown_func, 0xd451e834);
default: break;
}
@widberg
Copy link
Author

widberg commented Sep 24, 2025

No problem! Glad I got the keywords right so you could find it. This patch also helped me with The Witness and A Plague Tale: Innocence. For A Plague Tale: Requiem, I had to pass the -nosl command-line option to the game.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment