-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WebGPURenderer: Handle Device Lost Event #29767
WebGPURenderer: Handle Device Lost Event #29767
Conversation
📦 Bundle sizeFull ESM build, minified and gzipped.
🌳 Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
@RenaudRohlinger thanks for this PR ! Can you confirm this part Also I guess it also needs to restart all the engine ( add back all items, restore all state etc.. ) right or can I use the previous texture / scene / material etc.. ? Final question do you have an easy way to test the context lost ? :) Thanks again ! |
Description
Handle device/context Lost Event on both backends of the WebGPURenderer.
By default a formatted error will appear like so:
And just like in the
WebGLRenderer
, both loop will throw an early return.Also added a way to easily handle the error for the developer:
Even better, unlike WebGL, we could even gracefully restart the app/device in WebGPU:
This contribution is funded by Utsubo