`File::create` isn't available on wasm, so we can't actually write the
output image anywhere unless we target something else as the file
system (e.g. local storage)
259: Remove zerocopy and replace with bytemuck. r=kvark a=StarArawn
fixes#146
I've removed `zerocopy` from the examples and replaced it with `bytemuck`. I ran all of the examples/tests and everything ran great in vulkan on my windows box.
Co-authored-by: StarToaster <startoaster23@gmail.com>
251: cargo fmt the code and tweak format rules r=kvark a=chao-mu
Ran cargo fmt after removing rules per @kvark, two of which were because they needed nightly to run.
Co-authored-by: Hackpoetic <chao-mu@hackpoetic.com>
234: Implement Send and Sync for BufferReadMapping and BufferWriteMapping r=kvark a=Healthire
Co-authored-by: William Lundstedt <walundstedt@gmail.com>
214: Rewrite GpuFuture to avoid blocking and to use less space r=kvark a=lachlansneff
Since `GpuFuture` doesn't blocking wait for the mapping to resolve anymore, we need to poll the device for it to actually work. ~~I haven't added that to the `hello-compute` example, so it doesn't work anymore.~~
Co-authored-by: Lachlan Sneff <lachlan.sneff@gmail.com>
Remove odd patching matching
Replace std::sync::Mutex with spin::Mutex in GpuFuture
Reduce GpuFuture usage to one explicit allocation instead of two
Fix examples to poll the device in the background when using map_read or map_write
Remove device.poll from GpuFuture::poll and document future invariants
Massively simplify examples
Use Arc::clone(...) instead of arc.clone()
Switch println to log::info
213: Cleanup user-interface around async buffer mapping r=grovesNL a=lachlansneff
This PR cleans up the interface for asynchronous buffer mapping a little. It turns `map_read` and `map_write` into `async` functions (instead of returning `impl Future<...>`). It also adds a standin error type and removes some confusing type aliases.
Co-authored-by: Lachlan Sneff <lachlan.sneff@gmail.com>
219: Update Zerocopy to 0.3 r=kvark a=cwfitzgerald
In an effort to eliminate duplicate dependencies, especially on the proc-macro/syn stack, this updates zerocopy 0.2 (using syn 0.6) to zerocopy 0.3 (using syn 1). There appears to be no real api changes based on my skimming of the docs. Things compile on my windows machine, and hopefully it will pass on mac and linux.
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>