Home > Back-end >  How can i trigger a GPU Crash
How can i trigger a GPU Crash

Time:07-24

Sometimes we can trigger a "CPU Crash" with code like:

*(int*)0=1234;

Correspondingly, any simple code can trigger a "GPU Crash" (may need some DirectX interface)?

Why I need this is because I want to learn about Unreal's(UE4/UE5) GPU crash processing flow. Any code with UE is expected.

THX

CodePudding user response:

It is very difficult to crash a modern GPU with decent drivers. Generally they will run until task completion. If the task is extremely large or takes a very long time, the OS will assume they have simply stopped responding. After this occurs, there are a few options:

  • Crash: Very rare

  • Reset the driver: This will reset the DirectX state and crash whatever program is using it (unless it is checking for that, but that seems like a waste)

  • Abort the operation: This is a feature on more modern hardware and drivers, but they can simply stop the program.

  • Run uninterrupted: This occurs only if the GPU is in use by NOTHING else.

Do some heavy calculation with no end (fractals) and see what happens.

CodePudding user response:

You can trigger a 'Timeout Device Recovery' (TDR) which is very similar to a GPU crash.

Using a Visual Studio Developer Command Prompt running as admin:

dxcap -forcetdr

Keep in mind this triggers a TDR for all running applications.

  • Related