Conversation
emilk
approved these changes
Dec 13, 2023
Member
emilk
left a comment
There was a problem hiding this comment.
phew, that was a lot!
The frame_index_for_uncaptured_errors is a bit confusing to me - maybe you can make a diagram or something? 😬
…mproved-wgpu-error-handling
Member
Author
|
originally called |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
There's a bunch of things that probably should have been separate PRs but by the time I ventured there it got too hard to entangle, so please bear with me and read this detailed list of changes carefully (if you understand this list you've done half the review ;-)):
cfg_aliasesandcfg_ifin various places to make cfg decisions more readableErrorTrackeris now used in all build configurations. Previously, it was only active on debug native buildsRendererContextdoes now is to install global error handlers that feed into the "top level"ErrorTracker. Previously this was done delayed and only for debug+nativeErrorTrackernever panics nowErrorTrackerno longer uses a frame counting heuristic (!!) to discard all errors, but instead relies on precise device timeline frame counters to discard individual errorsContent(your code)Device(everything happening on wgpu::Device)Queue(everything happening on the GPU, represented by wgpu::Queue)ContentandDeviceare mostly in sync on wgpu-core, but NOT on WebGPU in general!ErrorTrackerinto its own module and fall back to simple string hashing for WebGPU(the only webgpu enabled build we have today), we don't even depend on wgpu-core!
WgpuErrorScopeutility for safe & fully covering wgpu error scopesnow_or_neveron wgpu-core backend since we know this is safe. On WebGPU we hand off execution to the browser.WgpuErrorScopein order to catch all errorsThings related, but NOT covered by this PR:
Checklist