783: Basic use of Error for bind groups r=kvark a=kvark
**Connections**
Follow up to #776
**Description**
Trying to tidy up a few things and add a public use of `Error` variant
**Testing**
not tested
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
782: Add check while trying to remove uninserted Ids r=kvark a=kunalmohan
**Connections**
_Link to the issues addressed by this PR, or dependent PRs in other repositories_
An attempt to fix#781
regression from #776
**Description**
_Describe what problem this is solving, and how it's solved._
When we used `VecMap`, it simply returned `None` for even out of bounds access to the map (We depended on it returning `None`). After #776 , we get a panic. So adding a simple index check before accessing it fixes this issue.
**Testing**
_Explain how this change is tested._
Tested on wgpu-rs examples with the changes in https://github.com/gfx-rs/wgpu-rs/pull/430. All examples run fine except the `cube` which segfaults.
<!--
Non-trivial functional changes would need to be tested through:
- [wgpu-rs](https://github.com/gfx-rs/wgpu-rs) - test the examples.
- [wgpu-native](https://github.com/gfx-rs/wgpu-native/) - check the generated C header for sanity.
Ideally, a PR needs to link to the draft PRs in these projects with relevant modifications.
See https://github.com/gfx-rs/wgpu/pull/666 for an example.
If you can add a unit/integration test here in `wgpu`, that would be best.
-->
Co-authored-by: Kunal Mohan <kunalmohan99@gmail.com>
779: Fix hub insertion r=kvark a=kvark
**Connections**
Fixes#778
Follow-up to #776
**Description**
Problem was `resize_with` takes new length, not a difference.
**Testing**
Untested
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
434: recreate swapchain on framework.rs examples on resize, ref #352 r=kvark,cwfitzgerald a=m4b
There still seem to be residual race condition like errors w.r.t. resizing on at least x11, but this does fix the panic on x11.
Co-authored-by: m4b <m4b.github.io@gmail.com>
773: Error handling for data transfer API r=kvark a=GabrielMajeri
**Connections**
Work on the error model described in #376
**Description**
Removes assertions from the transfer functions, instead returning a custom error type.
**Testing**
Checked with `player` and `wgpu-rs`: https://github.com/gfx-rs/wgpu-rs/pull/430
Co-authored-by: Gabriel Majeri <gabriel.majeri6@gmail.com>
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.