GPU: log the TDR settings, and warn when a GPU hang would freeze the PC
With TdrLevel 0 Windows never resets a hung GPU: a slow or hung world frame freezes the whole desktop, and the runtime never sees a device removal it could report (#1054). With 1 the timeout is a blue screen. Both are set by hand, often to keep slow frames from being reset, and reports of "the PC froze" do not say so. When the host device is made on a hardware adapter, read TdrLevel, TdrDelay and TdrDdiDelay from HKLM\SYSTEM\CurrentControlSet\Control\ GraphicsDrivers, log them ("default" where a value is not set), and warn for TdrLevel 0 or 1 with what to set instead. Co-Authored-By: Claude Opus 5.5 <[email protected]> (cherry picked from commit 42961e8e577e5f195db0982e34bb59e800998c77)
This commit is contained in:
1 parent
3a24b38bfb
commit
474f949c4d
4 files changed
+150
-1
No files matched your search
@@ -599,6 +599,8 @@ fn create() -> windows::core::Result<Host> {
|
||||
tracing::info!("host device on the software adapter (WARP)");
|
||||
} else {
|
||||
D3D12CreateDevice(None, D3D_FEATURE_LEVEL_12_0, &mut device)?;
|
||||
// Whether a GPU hang ends the run or freezes the PC (#1054).
|
||||
crate::tdr::log();
|
||||
}
|
||||
let device = device.ok_or_else(windows::core::Error::empty)?;
|
||||
// Before anything is made with it (`VICTORY_RECORD`).
|
||||
|
||||
Reference in new issue
Block a user