-
Notifications
You must be signed in to change notification settings - Fork 963
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
Clarify Error Handling #3767
Comments
Something that should be clarified in the docs: what if two threads push multiple error scopes at the same time? Are scopes local to the current thread, or will errors be sent to the thread which opened a scope last, or something else? On the web, this is less of an issue since everything is single-threaded, but what happens on native? |
This actually wasn't really previously defined - webgpu.h we decided they're going to be thread local. We need to redefine the api in wgpu to use a thread local. |
Annoyingly, Results don't cover all errors and we need this hacky error handler dance. See gfx-rs/wgpu#3767.
Annoyingly, Results don't cover all errors and we need this hacky error handler dance. See gfx-rs/wgpu#3767.
Stemmed from #3764
It is quite easy for new users to get baffled by the non-rustic error handling in wgpu right now. We should talk about this more in the documentation so that people can find their way to the appropriate error handling mechanism on their own.
Error handling is handled through three functions:
Device::push_error_scope
Device::pop_error_scope
Device::on_uncaptured_error
The text was updated successfully, but these errors were encountered: