wgpu-native icon indicating copy to clipboard operation
wgpu-native copied to clipboard

Any way to check that a buffer is unmapped?

Open lisyarus opened this issue 1 year ago • 2 comments

As I understand it, wgpuBufferGetMapState is currently not implemented. Is there any reason this functionality is unavailable, and is there any way to check if a buffer was successfully unmapped and can be used for further operations?

lisyarus avatar Jul 12 '24 13:07 lisyarus

In wgpu-py we don't use it, because in a wrapper its easy to keep track of the map-state yourself. I think its safe to assume that if wgpuBufferUnmap() successfully returns, all should be well.

So (speaking for myself) it's mostly not implemented due to a lack of need and time :) PR's to implement it are welcome though!

almarklein avatar Jul 15 '24 08:07 almarklein

@almarklein Thanks for your answer! I assumed that unmapping is some kind of async operation as well, but if I can just unmap synchronously, I guess I'm fine.

I'll try to see if I can submit a PR :)

lisyarus avatar Jul 15 '24 11:07 lisyarus