Display driver stops working

Started by
3 comments, last by hupsilardee 12 years ago
So I'm learning D3D11, and obviously I make mistakes sometimes, like forgetting to bind a vertex layout to the pipeline before drawing. Now in D3D9 this just means the triangle isn't rendered, but sometimes my display driver crashes if I ask it to execute this kind of erroneous code. I can tell that the rest of the system is running fine because my music keeps playing, but theres nothing I can do, Ctrl+Alt+Delete doesnt help, the screen just freezes, with the blank window and I have no choice but to restart. So what can I do to safeguard against driver crashes?
Advertisement
Unless you've messed with system settings, Windows Vista/7's display driver should kill the graphics driver a few seconds into the freeze and reset it to its default state. Quite helpful while developing, otherwise you have to reboot. Try re-enabling it, it's called TDR (timeout detection recovery).

And yes I noticed that too, D3D11 is very sensitive to malformed pipeline instructions.

“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”

Are you creating the device with the DEBUG flag? This will cause the runtime to do extra validation work, and return error messages for most error conditions. Usually the only time that I get a driver hang is if I actually have an infinite loop in a shader, or a shader takes an extremely long time to complete.
I am using the debug runtime, but I will also put an #ifdef _DEBUG #endif around the device creation flag, thanks MJP. Also that TDR sounds helpful, but how do I enable it in Vista?
Bump: This problem seems to occur when there is no vertex or pixel shader set. (Of course that explains why D3D9 doesnt behave badly, because it just ploughs on with the fixed-function, giving you junk results)

This topic is closed to new replies.

Advertisement