I’m currently developing a university in-hose interferometry signal processing and visualization tool. One recurring feature request / “bug” report is, that if the computer system is put into some suspend mode (suspend to RAM, hibernation), after resuming the program only displays and computes garbage.
Now I understand that system suspend may put the GPU into some undefined state. However, at least as OpenGL is concerned, driver assisted state recovery is indeed possible; OpenGL recovers just fine.
DirectX of course does support a GPU loss event. However I’m not aware of a CUDA API that provides for the reporting of explicitly GPU loss events.My best guess would be to test for a “device deinitialized” error flag and perform a full reinitialization when that happens.
Is this the right way to do it, or is there a better way?