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>
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.
These callbacks are executed outside of the mapping function and could
previously reference data that had been dropped. This fixes the
soundness issues described in #95, but not the buggy mapping
behavior.
80: Typed mapping of buffers r=kvark a=swiftcoder
Add a sprinkling of generics to remove the need for unsafe code to typecast slices resulting from mapping buffers.
Co-authored-by: Tristam MacDonald <tristam@trist.am>
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.
54: Document how to run examples r=grovesNL a=rukai
I had assumed the triangle example wasn't functional yet, because I didn't realize I had to specify a feature. I only realized it was supposed to work when I saw a screenshot of the cube example.
I'm not sure what the future is of the triangle example? Will it remain outside of the gfx-examples folder?
Co-authored-by: Rukai <rubickent@gmail.com>