-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Hi !
I am experiencing inconsistent behavior between WebGL2 and WebGPU in the event of a GPU crash, and I'm unsure if it's expected
When a GPU crash occurs on wasm, wgpu apps using WebGPU keep working as usual, just without graphics, and the console logs a warning like ⚠️ GPU connection lost
However, wgpu apps using WebGL2 panic, usually by an Error in Queue::submit: Validation Error. Caused by: Not enough memory left (the actual panic depends on the reason they lost access to the GPU I presume.
Repro steps
- This can can be reproduced using any wasm examples that support both
WebGL2andWebGPU - In Google Chrome, a GPU Crash can be simulated by writing
chrome://gpucrashin the address bar (see debug section atchrome://about/for reference)
I recorded a couple of videos showcasing this behaviour in the "Shadow" example of the repo, running on wasm with the command from the readme cargo xtask run-wasm --bin wgpu-examples ...
Describe the solution you'd like
So, in other web game engines using webgl2 rendering, like Babylon.js, they can keep working without graphics after a fatal error like this happens, and they can even recover from it. That means that, if such web game engines were using wgpu and webgpu, they would not have to implement this by themselves, which is great.
In the case of Babylon.js:
this is where they got this feature request:
and this is the PR that implemented it:
So, my question is:
Can wgpu implement a similar resilience for WebGL2 as well, or is this behaviour an inherent limitation of lower level actors like glow or WebGL2 itself?
If the latter, feel free to close the issue as won't do. Thx! 😄