1226: Update gfx and naga to gfx-12 r=kvark a=kvark
**Connections**
Picks up https://github.com/gfx-rs/gfx/pull/3650Fixes#1225
**Description**
Also fixes our playtests, interestingly. One of the changes here was that now `Analysis` is needed for everything, including the SPV-out backend of Naga. And we can only get it via validating the `naga::Module`.
What we used to was: if validation isn't enabled, we'd carry the module around, and then still try to produce a SPIR-V from it, if there is no original SPIR-V. This precise thing was happening in the tests. However, we had `dummy` backend depending on the `wgpu-core/cross` feature, which means the playtests were actually built and run with spirv-cross enabled!
Another factor here is the introduction of `ShaderModule::flags` instead of a single boolean, which was done in #1093. The problem here was that the playtest RON files weren't updated accordingly, they still had `experimental_translation: true` in them, which got ignored now.
So with this combination of events, the playtests ended up generating SPIR-V from Naga modules, without validation(!), and passing the SPIR-V to gfx-rs and SPIRV-Cross... Which still worked, as we'd expect, but definitely not want here.
So this PR fixes everything. It makes it required to have the validation for a module, and we force-validate if there is no SPV source to fall back on. And it disables "cross" feature implicitly enabled in testing.
**Testing**
Tested on wgpu-rs examples.
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
1224: Update the blend API to upstream r=kvark a=kvark
**Connections**
Matches https://github.com/gpuweb/gpuweb/pull/1134
**Description**
Makes blending state ON/OFF explicit.
**Testing**
Simple enough!
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
765: Update naga to gfx-11 r=cwfitzgerald a=kvark
Gets us https://github.com/gfx-rs/wgpu/pull/1220
Note that "cross" feature is not optional here. We could lift it up and add to `default = []` but that would make the Web backend to always unconditionally depend on `wgpu-core` (since enabling a feature on it automatically enables it). So we ideally need a way for Cargo to allow platform-specific default features...
About the shadow example - the experimental translation works on the main pipeline, but fails on the baking pipeline because of https://github.com/gfx-rs/naga/issues/483. Fortunately, it falls back to SPIRV-Cross gracefully here.
The new validation detected a flaw in our shader (comparison sampler mismatch), yay!
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
1220: Update naga to gfx-11, make spirv-cross optional r=kvark a=kvark
**Connections**
https://github.com/gfx-rs/gfx/pull/3642https://github.com/gfx-rs/gfx/pull/3641
**Description**
Gets us the latest Naga updates, plus the ability to make spirv-cross optional (on Linux and Windows only for now).
**Testing**
Will be tested on wgpu-rs
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
1219: Validate texture bindings r=cwfitzgerald a=kvark
**Connections**
It was mentioned/requested somewhere, but I can't find the place...
**Description**
Fairly straightforward - just check the view properties against the bind group layout.
**Testing**
Tested on wgpu-rs examples
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>