Save API Context State To-Disk?

Simple question, but I can’t see how to do this in Nsight Graphics.

  • Q: In the Frame Debugger, on a Draw Call, how do I save the current graphics API context state to-disk (text format)? I’m interested in this for OpenGL.

What I’d like to do here is diff the context state between two points in a frame.

Thanks in advance for any suggestions!

Hello,
Thank you for using Nsight Graphics and I apologize we missed your request earlier. I did create a case in our tracking system to follow through on your request.
Regards,

Hello,
A few months ago you had a question regarding the ability for Nsight Graphics to save API context state to disk. I wanted to let you know that this request has been addressed in Nsight Graphics 2022.4.0, released on 08/10/2022. Thanks again for your question, and if you have any further comments, please don’t hesitate to send in more feedback.
Thanks,

Thanks @dwoods ! Yes, I was noticing this in the 2022.4.0 announcement video:

Tested this out here, and it works great! It’ll be a big help in diagnosing issues quickly.

In the future, it would be useful if:

  • Export to JSON exported all of the state in the API Inspector rather than just the state in a single page/tab (so only 1 save per frame location is required), and
  • Export to JSON preserved the last-selected save directory in the Export page to JSON save dialog (currently you have to re-activate the save directory per-save),

but like I said, this is a big step forward!

I was also very pleased to see GPU Trace support for OpenGL apps show up. I’ll be spending much more time with this soon. Great work!

Hello,
Thank you for sharing and I’m glad the updates to the API Inspector is working for you. I will create a feature request for the 2 additional asks you had regarding “Export to JSON”. I’m also very excited to hear that you will be able to benefit from the work done to get GPU Trace support for OpenGL released. Good stuff!!!
Regards,

Hello,
A few months ago you reported an issue regarding how to save the current graphics API context state to disk. I wanted to let you know that this issue has been addressed in a previous version of Nsight Graphics. You can get the latest version and try out this fix. Thanks again for reporting your issue, and if you have any further comments, don’t hesitate to send in more feedback.
Regards,

I’ve tested #2 above and it works great. Thanks @dwoods!

I’m assuming only #2 was addressed though, as I still don’t see a way to save all of the state to JSON in one save operation (#1). And the current Nsight Graphics User’s Manual only calls out the JSON save feature being available per-page:

Hello,
You are indeed correct. #1 in that list is still not resolved, but we do have an open case for it in our tracking database and currently it is targeted for our next major Nsight Graphics release, 2023.1. I’ll let you know once that happens.
Regards,

Great – thank you!

Hello,
This issue should now be resolved. Please try out the latest Nsight Graphics release to confirm and let us know if you still see this issue.
Regards,

I just pulled Nsight Graphics 2023.3.2 and took this for a spin.

This works great! Thank you! This’ll be incredibly useful for debugging those time-consuming “what draw state is different” issues where something doesn’t render correctly.

Just do:

  • API InspectorExport All Pages to Json

on 2 different draw calls, and then diff the Context State JSON files.