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>
201: Add note that `slot` refers to the index in RenderPipelineDescriptor r=kvark a=aloucks
Add note that `slot` refers to the index in `RenderPipelineDescriptor::vertex_buffers`
Also fixed intra-doc links for `set_vertex_buffer`.
Co-authored-by: Aaron Loucks <aloucks@cofront.net>
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.
518: Wholesome spec update r=grovesNL a=kvark
Addresses https://github.com/gfx-rs/wgpu-rs/issues/196
Biggest change is that buffer binding is done one by one. There is a number of renamings of the fields, also the binding types are expanded.
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
514: Move some types into shared wgpu-types crate r=kvark a=grovesNL
As we discussed a while ago, we need to be able to share some types between wgpu-core/wgpu-native/wgpu-remote/wgpu-rs.
The problem is that we want to avoid a dependency on wgpu-core and wgpu-native when building [wgpu-rs for the wasm32-unknown-unknown target](https://github.com/gfx-rs/wgpu-rs/issues/101). We can avoid this by moving all shared types into a separate crate which is exposed on all targets.
Let me know if we should use some other approach or organize the types somehow. This isn't complete yet, but it might be easier to integrate this over several PRs instead of diverging my branch too far.
Co-authored-by: Joshua Groves <josh@joshgroves.com>
192: Explicitly declare vertex attribute descriptors in cube example r=kvark a=aloucks
The new `vertex_attr_array!` macro is pretty wonderful, but it's nice to have at least one reference example of how `VertexAttributeDescriptor`s are constructed.
Co-authored-by: Aaron Loucks <aloucks@cofront.net>
512: Add PresentMode::Mailbox r=kvark a=aloucks
@kvark
Would you be open to renaming the presents modes to match the vulkan/gfx-hal nomenclature? Considering these aren't part of the webgpu spec, I think it would make more sense to keep things consistent.
I can update this PR if you're good with it.
```rust
pub enum PresentMode {
/// The presentation engine does **not** wait for a vertical blanking period and
/// the request is presented immediately. This is a low-latency presentation mode,
/// but visible tearing may be observed. Will fallback to `Fifo` if unavailable on the
/// selected platform and backend. Not optimal for mobile.
Immediate = 0,
/// The presentation engine waits for the next vertical blanking period to update
/// the current image, but frames may be submitted without delay. This is a low-latency
/// presentation mode and visible tearing will **not** be observed. Will fallback to `Fifo`
/// if unavailable on the selected platform and backend. Not optimal for mobile.
Mailbox = 1,
/// The presentation engine waits for the next vertical blanking period to update
/// the current image. The framerate will be capped at the display refresh rate,
/// corresponding to the `VSync`. Tearing cannot be observed. Optimal for mobile.
Fifo = 2,
}
```
Co-authored-by: Aaron Loucks <aloucks@cofront.net>
189: Reexport Backend and DeviceType from wgpu-core r=kvark a=aloucks
These types are exposed on the `AdaptorInfo` struct.
Co-authored-by: Aaron Loucks <aloucks@cofront.net>