127: Track async mapping properly r=grovesNL,swiftcoder a=kvark
Fixes#117, fixes#95, fixes#132
The change can be logically split into 3 parts:
1. when `ActiveSubmission` is retired, we now move the mapped buffers into the "ready to map" vector. This was the missing bit that caused mapping to not work previously.
2. mapping callbacks in Rust wrapper are refactored and they `unmap()` automatically now on users behalf
3. we wait for idle before destroying the device, which allows us to process all the pending callbacks. This fix gets rid of the dummy submission our compute example used to do.
Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
112: Correctness fixes from 0.2, plus a lot of goodies r=kvark a=kvark
These are changes from #110 back-ported to master.
Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
96: Add the static lifetime bound to async buffer mapping callbacks r=kvark a=aloucks
These callbacks are executed outside of the mapping function and could previously reference data that had been dropped. Related #95.
Co-authored-by: Aaron Loucks <aloucks@cofront.net>
This allows async buffer mapping to function when a renderpass
is also submitted on the queue. The state transition and fencing
still needs work, however.
84: Create buffer mapped r=kvark a=swiftcoder
I haven't really taken a swing at error handling here, posting it up early for feedback on the API.
85: Unpin nightly date for bindings generation r=kvark a=grovesNL
rust-lang/rust#57915 allows us to run bindings generation with nightly again, so we shouldn't have to pin to an older nightly date anymore (assuming everyone has a recent nightly).
Co-authored-by: Tristam MacDonald <tristam@trist.am>
Co-authored-by: Joshua Groves <josh@joshgroves.com>
Adds preliminary transitioning of buffers to mapped state.
Adds buffer unmapping to the cube sample.
Modifies wgpu_queue_submit to not hold a write lock on the device during callbacks.