I was trying to do a pre-calculations of an SSAO effect by rendering normals and depth on a cubemap and doing a second ssao pass on each of these faces. The problem is I'm getting a timeout: "the nvidia opengl driver lost connection with the display driver...", when using high resolutions. Is there a good way to do such calculations without having to tweak registry values? I want this to be able to work for other people too.

In essence I'd love if there was also a way to add something like a loading bar so that people don't think the program crashed or something.


What you want to do is make sure you present something to the screen during this process, because it's essentially the time between those that Windows is looking at. Rendering a progress bar between each cube map face should be enough to do the trick in your case as you aren't too far over the limit. I believe the default limit is two seconds per frame.

However, make sure you test it on low end hardware as that will take even longer and be more likely to timeout.

Alternatively pre-compute the cube maps on your PC, and save them out. That way you cut down on the loading time for everyone as well as avoiding the TDR.

  • \$\begingroup\$ Thank you for your answer. Is it sufficient to swap buffers after each face or do I have to draw something? What should one do if the calculation can't be broken up into smaller parts? \$\endgroup\$ – Grieverheart Dec 23 '12 at 18:30
  • \$\begingroup\$ I believe with OpenGL either glFlush() or glFinish() will do the trick, so you don't actually need to render anything. Once you've got down to the case where rendering one pixel takes two seconds then your options are to either split the processing up into multiple passes, or adjust the timeout in the registry. \$\endgroup\$ – Adam Dec 30 '12 at 1:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.