Skip to content
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

Fix crash on dropped frame when buffer mapping hasn't completed yet #20

Merged
merged 2 commits into from
Sep 18, 2022

Conversation

Wumpf
Copy link
Owner

@Wumpf Wumpf commented Sep 17, 2022

Simplified alternative to fix in #18 and commented a bit what's happening on a frame drop (took me way too long to figure that out again). I decided to ignore the BufferAsyncError after all in the expectation that wgpu will soon be able to report aborted mappings. This should be safe since the only way to trigger this error is an unmap call (and naturally, wgpu-profile owns all of these for the buffers in question), see https://www.w3.org/TR/webgpu/#dom-gpubuffer-unmap

However, the error code are not yet exposed in wgpu, eagerly awaiting the resolution gfx-rs/wgpu#2939

PR comes with a regression test :)
(which gives a stable repro for the previous issue)

@Wumpf
Copy link
Owner Author

Wumpf commented Sep 17, 2022

@JCapucho can you have a look at confirm whether this solves your problem?

@JCapucho
Copy link
Contributor

@Wumpf the changes work perfectly for me

@Wumpf Wumpf merged commit 68ef04a into main Sep 18, 2022
@Wumpf Wumpf deleted the dropped-frames2 branch September 18, 2022 17:30
@Wumpf
Copy link
Owner Author

Wumpf commented Sep 18, 2022

@JCapucho published 0.9.1 with the fix

@JCapucho
Copy link
Contributor

Thanks @Wumpf for pushing a new version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants