Main change here is the introduction of the Context trait.
The "direct" implementation of it goes straight to wgpu-core.
This commit also has small improvements:
- consuming command buffers on submit
- Instance type
- proper call to destructors
`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)
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
210: Update WGPU deps to rev 08e8d406c1 r=kvark a=aloucks
I also moved the `path` chunks in `Cargo.toml` to a single `[patch]` section so that it's one block to commment/uncomment for local development.
Co-authored-by: Aaron Loucks <aloucks@cofront.net>
200: Derive `Hash` and `PartialEq` for unique identifier wrapper types r=kvark a=mitchmindtree
This is particularly useful downstream for distinguishing between
instances of these types.
I was unsure about `Device` as I noticed it has a `Temp` field that
looks like it might eventually store some non-PartialEq/Hash-friendly
fields.
Let me know if you'd like me to add a derive for `Device` or if there
are any issues with those I have updated.
Co-authored-by: mitchmindtree <mitchell.nordine@gmail.com>
This is particularly useful downstream for distinguishing between
instances of these types.
I was unsure about `Device` as I noticed it has a `Temp` field that
looks like it might eventually store some non-PartialEq/Hash-friendly
fields.
Let me know if you'd like me to add a derive for `Device` or if there
are any issues with those I have updated.