HRESULT hr = pSwapChain->Present(0, 0); if (hr == DXGI_ERROR_DEVICE_REMOVED) HRESULT reason = pDevice->GetDeviceRemovedReason(); // reason will be 0x887A0005 or something more specific like DXGI_ERROR_DEVICE_HUNG
| Cause | Explanation | |-------|-------------| | | Windows’ GPU watchdog (Timeout Detection & Recovery) kills the GPU command if it takes >2 seconds. The device is “removed” to reset the driver. | | Overheating | GPU thermal throttling or shutdown. | | Driver crash | Buggy, outdated, or corrupted graphics driver. | | Power issues | Insufficient PSU or unstable overclock/undervolt. | | Out of memory | GPU video memory exhausted; driver resets the device. | | Hardware failure | Failing GPU, bad VRAM, or unstable PCIe connection. | How it looks in different scenarios For Developers (C++ / DirectX 11/12) You’ll see this when calling IDXGISwapChain::Present() or ID3D11Device::GetDeviceRemovedReason() : win32 function failed hresult 0x887a0005
if (hr == DXGI_ERROR_DEVICE_REMOVED) HRESULT removedReason = m_device->GetDeviceRemovedReason(); LogError("Device removed! Reason: ", removedReason); RecreateDeviceAndResources(); // Your custom recovery function HRESULT hr = pSwapChain->Present(0, 0); if (hr ==