Skip to content

How to read from buffer without 'Buffer in not mapped error' (wasm version, winit loop) #2593

Answered by grovesNL
jaankaup asked this question in Q&A
Discussion options

You must be logged in to vote

poll no-ops on the web (see https://docs.rs/wgpu/latest/wgpu/struct.Device.html#method.poll), so you won't be able to wait/synchronously block on the buffer to be mapped like you can natively.

Instead you'll need to await map_async for this to work on the web.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jaankaup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants