In the Nsight Graphics Frame Debugger, how do I trigger frame capture from source code?
The intent being to capture and trace draw calls which do not re-occur every frame. For instance, those used to preprocess GPU uploaded data into texture content and/or geometry stored in buffer objects that will be used for rendering every frame.
What’d be ideal is if there’s some NVTX markup API I could call which Nsight Graphics would interpret as “start capture”. For instance:
Thank you for using Nsight Graphics. Have you had a chance to use the Nsight Graphics SDK? This allows for programmatic capture. See the link here https://docs.nvidia.com/nsight-graphics/NsightGraphicsSDK/index.html.
By the way the Nsight Graphics SDK is included in the download of the Nsight Graphics install. Please let us know if this is helpful.
The SDK only supports single-frame capture. The trigger captures from the current frame to the next frame seen. There isn’t an arbitrary start/stop.
It starts after the next delimiter is observed.
The tool doesn’t have an NVTX-markup based capture, no.
Note that you do not have to recompile on each version of Nsight Graphics in use. The SDK will enumerate all versions of Nsight Graphics installed on the machine and, depending on the version chosen by the application, it will load a helper DLL that uses that specific version of Nsight Graphics. i.e. you can use the SDK from Nsight Graphics 2022.1 and still complete a capture with Nsight Graphics 2022.7.
Ok. So I guess we’d have to plumb up knowledge to the end of the last frame as to whether the following frame will trigger the behavior we want to capture. And if so, trigger NGFX_INJECTION_ACTIVITY_FRAME_DEBUGGER before the frame delimiter.
If it’s easy, that’d be a nice add!
Ok, that’s good. So it would be sufficient to have any version of Nsight Graphics installed on the build machines to compile+link in support for this.
Alternatively (and possibly better), we could LoadLibrary() + GetProcAddress() the DLL APIs at runtime to call them. That way we don’t need to link this library up-front at compile time.
The challenge there is the version-specific paths to these libraries: