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.
94: Update C example r=kvark a=grovesNL
- Move `winit` behind a feature in wgpu-native
- Update C example to newer wgpu-native API
- Expose `Id` as `repr(C)`
- Add clang-format configuration for C files
- Add C example to CI (we can move parts of this back into the Makefile in a follow-up PR)
Co-authored-by: Joshua Groves <josh@joshgroves.com>
93: run cargo fmt r=kvark a=swiftcoder
Since we have a little downtime, let's see how awful this is :)
Co-authored-by: Tristam MacDonald <tristam@trist.am>
87: Convert shadow sample to map_async r=kvark a=swiftcoder
Works great under Vulkan, but there's a bug that pauses the whole app after about a second under DX12. I don't think I introduced the bug, but it's hard to tell since we don't have a before state for DX12.
I'm going to send some ergonomic and validation improvements for buffer mapping in another PR, because while debugging this I ran into some rough edges.
Co-authored-by: Tristam MacDonald <tristam@trist.am>
90: Basic render pipeline compatibility check r=grovesNL a=kvark
A bit of refactoring for nicer code, and now we are matching the attachment formats of pipelines bound to passes.
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
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>
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>
81: Buffer tracking and unmapping r=kvark a=swiftcoder
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 (this could definitely be cleaner, but I'm not sure which direction to take refactoring here).
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.