* Implement the wrapping in Expression::Load instead
* Add changes to stack size
* stable and nightly can't seem to agree on a stack size
* Apply suggestions
* Add a comment about unexpected path
* Update skybox snapshot
* should_pack_struct_member returns an Option<ScalarKind>
* Remove accidental file
When validating IR, verify that all `Binding`s for vertex shader outputs and
fragment shader inputs, whether directly in the argument or result, or applied
to a struct member, has specified an interpolation and sampling, not `None`.
This ensures that front ends explicitly state their policies, rather than
coasting through on back ends' default behavior.
In practice, all our front ends have very similar defaults, so provide a utility
function on `Module` to apply these rules. Use this utility function in the
SPIR-V and WGSL front ends; GLSL seems to already fill in interpolation as
required.
* Add struct instantiation support to wgsl-in
* Readd type matching and move struct test
* rebase onto master and update tests
* Update tests to upstream
* Fix merge errors
* Rebase onto master
* [wgsl-in] delay composite type creation
* Use the new WGSL construction syntax in the tests
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
* Impl `Hash` for `msl::Options`
* Remove ordered float
* [msl] derive everything on Options manually
* [msl] switch from Arena to Vec for the options
* Fix the clippy error by allowing derive_hash_xor_eq
* Fix skybox test
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
Use `back::glsl::features::FeaturesManager` to detect which qualifiers the given
module actually uses, and check them against the requested GLSL version.
The `linear` and `sample` qualifiers for fragment shader inputs are not
supported in all versions of GLSL that Naga can generate.
Non-exhaustive matches on `Expression` make it harder to review changes that add
new enum variants, because the compiler can't tell you that you've missed a
case.
Although I believe Clippy is able to do so, I don't think we should make a
blanket rule of forbidding wildcard match arms against `Expression`. There are a
few matches that are only concerned with a handful of variants, or a single
variant. For example, variant, naga::front::spv::Parser::next_block is only
concerned with whether an expression is a constant or not. In principle, these
sites should also be checked when adding a new variant, but it seems too
burdensome to require them to list all the `Expression` variants they don't care
about. The principle should be applied only to matches that are already handling
most variants.
At the moment, there is only one such match on `Expression` in the code base,
and it's only missing a few variants, so this is quick to fix.