Commit Graph

3 Commits

Author SHA1 Message Date
Jim Blandy
4f442ff8cc Require binding interpolation to be resolved by the front end.
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.
2021-04-19 09:42:00 -04:00
Lachlan Sneff
4cbef59dd6 Add struct instantiation support to wgsl-in (#507)
* 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>
2021-04-17 01:14:07 -04:00
Dzmitry Malyshau
c2c93e4ecd Remove cargo-insta 2021-04-14 16:10:31 -04:00