433: make env_logger a dev dependency r=kvark a=cart
env_logger is only used in examples and adds a good number of dependencies to the build tree that arent needed
Co-authored-by: Carter Anderson <mcanders1@gmail.com>
769: Implement and Validate all WebGPU Limits r=kvark a=cwfitzgerald
**Connections**
None?
**Description**
This adds all the limits that webgpu has currently. It also validates the values.
The main piece of code here is `BindingTypeMaxCountValidator` and `PerStageBindingTypeCounter` which provides the interface for figuring out the maximum per-stage counts in the pipeline. For each `BindGroupLayout` a `BindingTypeMaxCountValidator`is put together during creation using all of the bindings. Then the `BindingTypeMaxCountValidator`s are combined into a single max. This is then validated against the max limits.
Each commit should be independently testable and are grouped by responsibility.
**Testing**
I modified the wgpu-rs example framework to ask for extremely reduced limits and then tested various examples to verify it properly accepted/rejected based on the actual limit.
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
766: Validate set_bind_group is within bounds of limit r=kvark a=cwfitzgerald
**Connections**
~~Don't think there are any.~~ Would provide a nicer error message for https://github.com/gfx-rs/wgpu-rs/issues/411.
**Description**
Implements checks related to our only limit.
**Testing**
Untested
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
763: Remove raw pointers from the render pipelines API r=kvark a=GabrielMajeri
**Connections**
Rust-ification of API, as part of #689
**Description**
The objective is to get rid of raw pointers in the render pipeline descriptor and associated structures.
**Testing**
Checked with `player` and the `trace` feature, and with `wgpu-rs` with the changes in https://github.com/gfx-rs/wgpu-rs/pull/425
Co-authored-by: Gabriel Majeri <gabriel.majeri6@gmail.com>
764: Remove UnsafeFeatures as we decided the top level guard is not useful r=cwfitzgerald a=kvark
**Connections**
Reverts part of #691 about unsafe extensions
**Description**
Top-level unsafe is not sound. We still need unsafety close to the spot where it's triggered.
**Testing**
untested
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
Previously the lexer would accept any alphanumeric character as part of an
identifier. The spec only allowes identifiers to consist of ASCII alphanumeric
characters though.
759: Bump the maximum bind groups to 8 r=kvark a=kvark
**Connections**
https://github.com/gfx-rs/wgpu-rs/issues/411#issuecomment-653756154
**Description**
This is the hard upper bound. It can be 4, technically, but it would make sense to raise it to at least 8.
**Testing**
Untested, should work still.
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
Until now the WGSL parser would interpret a character index as a byte index.
This could lead to a panic on invalid input strings like "\"\u{2}ПЀ\u{0}\"",
because it would use that index to slice a string without ensuring the slicing
happens on a character boundary.
One possible fix would have been to call `str::find` instead of `position`,
however by relying on `splitn` instead of slicing a str manually it is
easier to convince ourselves that this code can no longer panic.
Fixes https://github.com/gfx-rs/naga/issues/90