Skip to content

How to properly write to a buffer every frame? #1438

Answered by kvark
nikitablack asked this question in Q&A
Discussion options

You must be logged in to vote

Ok, I got it - no memory mapping on the host with wgpu.

wgpu allows you to have mapping with that native-only extension. WebGPU does not.

By "more copies" I mean that:

Your assessment is correct.

And here I confused again - previously you told that there's no mapping at all. But this flag hints at something opposite. The documentation adds to my confusion: mapped_at_creation: Allows a buffer to be mapped immediately after they are made. It does not have to be BufferUsage::MAP_READ or BufferUsage::MAP_WRITE, all buffers are allowed to be mapped at creation. So in the end it is mapped without specifying a feature?

Ok, sorry for confusing you! mapped_at_creation is not really a generic…

Replies: 0 comments 9 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@kvark
Comment options

kvark Feb 7, 2021
Maintainer

@nikitablack
Comment options

@kvark
Comment options

kvark Feb 7, 2021
Maintainer

@nikitablack
Comment options

Comment options

You must be logged in to vote
2 replies
@nikitablack
Comment options

@kvark
Comment options

kvark Feb 7, 2021
Maintainer

Answer selected by nikitablack
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