webgpu-errors-device-loss
Installation
SKILL.md
WebGPU Device Loss and Recovery
Handle the GPUDevice.lost promise correctly and rebuild GPU state after a loss
with an explicit, reason-checked re-initialization, never a silent retry loop.
Quick Reference
GPUDevice.lost is a read-only Promise<GPUDeviceLostInfo> that stays pending for
the device's whole lifetime and resolves once when the device becomes unusable.
It NEVER rejects. The resolved GPUDeviceLostInfo carries reason and message.
Applies to WebGPU 1.0-stable (Chrome 113+, Safari 26+, Firefox 141+).
GPUDeviceLostInfo.reason |
Meaning | Recover? |
|---|---|---|
"destroyed" |
The app called device.destroy() deliberately. |
NEVER |
"unknown" |
Transient external cause: GPU process crash, driver update, hardware removed, browser reclaiming resources. | YES, reason-checked |