815: Remove error logging from `binding_model` r=kvark a=GabrielMajeri
**Connections**
Part of #638
**Description**
Removes some `log::error!` calls from `binding_model.rs`, instead encoding the messages in the error type.
**Testing**
Checked with core.
Co-authored-by: Gabriel Majeri <gabriel.majeri6@gmail.com>
812: Error type for `WaitIdle` r=kvark a=GabrielMajeri
**Connections**
Part of #638
**Description**
Adds an error type for the `wait_idle` function.
**Testing**
Checked with core.
Co-authored-by: Gabriel Majeri <gabriel.majeri6@gmail.com>
811: Error type for `command_encoder_finish` r=kvark a=GabrielMajeri
**Connections**
Part of #638
**Description**
Makes `command_encoder_finish` return an error type.
**Testing**
Checked with core.
Co-authored-by: Gabriel Majeri <gabriel.majeri6@gmail.com>
810: Convert the existing error types to `thiserror` r=kvark a=GabrielMajeri
**Connections**
Part of #638
**Description**
Converts the crate's existing error types from a manual `Display` implementation to using `thiserror`.
**Testing**
Tested with core and `wgpu-rs`.
Co-authored-by: Gabriel Majeri <gabriel.majeri6@gmail.com>
809: Safe error handling for swap chain r=kvark a=GabrielMajeri
**Connections**
Part of #638
**Description**
Error types for swap chain functions, using `thiserror` to avoid boilerplate code.
**Testing**
Checked with core and player.
Co-authored-by: Gabriel Majeri <gabriel.majeri6@gmail.com>
447: Remove Lifetimes from Push Constants r=kvark a=cwfitzgerald
This is sound because for render passes, compute passes, and render bundles we immediately copy the data into an internal buffer then refer to the data by offset into the buffer.
This also cleans up the example a bit as we don't need the array to outlive the statement.
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
808: Use `thiserror` for validation module r=kvark a=GabrielMajeri
**Connections**
Part of #638
**Description**
_Describe what problem this is solving, and how it's solved._
**Testing**
Checked with core repo. This doesn't change any code, just adds an `Error`/`Display` implementation.
Co-authored-by: Gabriel Majeri <gabriel.majeri6@gmail.com>
803: Player-based GPU test framework r=cwfitzgerald a=kvark
**Connections**
Closes#786
**Description**
This change adds a GPU-based testing by re-using the Player from tracing infrastructure - #289.
It converts the player into a lib + binary, and adds an integration test into the crate that implements RON-specified testing.
Current implementation has a few requirements/gotchas that are listed in `test.rs`:
* in all the IDs, the backend is `Empty`
* all expected buffers have `MAP_READ` usage on them
* last action is `Submit`
I believe it's workable, and we can improve it down the road (e.g. with #792).
**Testing**
MUHAHAHA
`cargo test` nails it
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
806: Fix rods error check - fixes water example r=kvark a=rukai
**Description**
Fixes water example panic
**Testing**
Tested on every wgpu-rs example
Co-authored-by: Rukai <rubickent@gmail.com>
443: Implement typical Error traits for SwapChainError r=kvark a=DasEtwas
Added Display and Error implementation for SwapChainError, imported Display and Error more nicely for the existing errors.
Co-authored-by: DasEtwas <18222134+DasEtwas@users.noreply.github.com>
800: Add the preferred format query r=cwfitzgerald a=kvark
Just getting us synced up to the spec naming and API for the swapchains...
Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
802: adds size function for VertexFormat r=kvark a=bootra-dev
Addresses https://github.com/gfx-rs/wgpu/issues/801
This PR adds a simple size function to the VertexFormat enum. It returns a u64 so that it can be conveniently used with the VertexAttributeDescriptor offset.
Co-authored-by: bootra-dev <bootragames@gmail.com>
798: Fixed storage buffer counting towards storage textures for binding validation r=kvark a=Wumpf
See title.
(broke my group layout creation since my compute shaders need quite a few storage buffers _and_ storage textures bound... ;-))
Co-authored-by: Andreas Reich <r_andreas2@web.de>
439: Update to latest `wgpu-core` r=kvark a=GabrielMajeri
Pull in some of the latest changes from the `wgpu` repo
Co-authored-by: Gabriel Majeri <gabriel.majeri6@gmail.com>
799: Derive Hash on BindGroupLayoutEntry r=kvark a=kunalmohan
**Connections**
_Link to the issues addressed by this PR, or dependent PRs in other repositories_
**Description**
_Describe what problem this is solving, and how it's solved._
Required in Servo.
**Testing**
_Explain how this change is tested._
Not tested.
<!--
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>
441: Impl Error for Error types r=kvark a=cwfitzgerald
I believe these are the only two results the api returns.
thiserror seems like a big hammer for such a small job, especially as all wgpu-core errors are unwrapped by wgpu-rs. Lets keep doing log + error as we are now for all the rest. Keep our dep on syn off.
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
796: Safe error handling for command API r=kvark a=GabrielMajeri
**Connections**
Part of #638
**Description**
Initially started to remove assertions from the `bundle.rs` file, but ended up implementing safe error handling for the whole `command` module.
**Testing**
Checked with core and player.
Co-authored-by: Gabriel Majeri <gabriel.majeri6@gmail.com>