Commit Graph
30 Commits
Author SHA1 Message Date
Dzmitry Malyshau 0725417193 Allow indexing value pointers (#758) 2021-04-23 01:19:48 -04:00
Dzmitry Malyshau 5d1746b0b4 Swizzle expression (#734) 2021-04-20 22:03:54 -04:00
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
Jim Blandy 0910af2718 [wgsl-in] Implement WGSL interpolate syntax from gpuweb PR #1605.
Fixes: #670
2021-04-19 09:42:00 -04:00
Jim Blandy 99a9e1e78e Change Binding::Location to a struct-style enum variant.
This commit makes no other changes. This is in preparation for adding a third
field, at which point tuple variants start to get obscure.
2021-04-19 09:42:00 -04:00
Dzmitry Malyshau 62c2cf7332 Validate composite constants (#729) 2021-04-18 23:19:09 -04:00
Dzmitry Malyshau daf4c82376 Allow stepping on floats in the validator (#724) 2021-04-16 16:16:15 -04:00
Jim Blandy 576723960e Permit interpolation qualifiers on both vertex outputs and fragment inputs. 2021-04-15 17:19:20 -04:00
Dzmitry Malyshau d3b39d9e58 Splat expression in the IR 2021-04-14 19:26:20 -04:00
Simas Toleikis 98252cf5d2 Fix validation for textureDimensions(t) call. 2021-04-10 18:19:42 -04:00
Dzmitry Malyshau 604e10e19b Rewrite IR to have member offsets, full structure span and alignment 2021-04-08 23:15:03 -04:00
Dzmitry Malyshau 7326ba6ddb New struct layout IR 2021-04-08 23:15:03 -04:00
Dzmitry Malyshau 4389a86787 Fix layout roundup 2021-04-03 00:41:32 -04:00
Dzmitry Malyshau ca6876b7a0 Validate math functions 2021-03-29 11:06:41 -04:00
Dzmitry Malyshau ba055bfbad Fix validation of constant offset expression 2021-03-27 00:29:48 -04:00
Dzmitry Malyshau 7d042337e2 Align the block decoration with SPIR-V, require storage buffers 2021-03-25 12:34:25 -04:00
Dzmitry Malyshau e87f57d82c Fix expression validation check 2021-03-25 09:32:55 -04:00
Dzmitry Malyshau 06d777b609 Make layout validation optional, disable the struct size check 2021-03-24 21:03:00 -04:00
Dzmitry Malyshau a0b5717fed Validate image stores 2021-03-24 12:32:32 -04:00
Dzmitry Malyshau 69a0fbd00e Validate image sampling and value casting 2021-03-24 12:32:32 -04:00
Dzmitry Malyshau 8c73c0c5df Validate derivatives and image loads 2021-03-24 12:32:32 -04:00
Dzmitry Malyshau 7a246f6a14 Validate image queries and valid shader stages for derivatives 2021-03-24 12:32:32 -04:00
Dzmitry Malyshau 8712020115 Move Layouter into ModuleInfo 2021-03-23 10:11:50 -04:00
Dzmitry Malyshau 6086f13bf0 Move the growable typifier into frontend helpers 2021-03-22 15:17:00 -04:00
Dzmitry Malyshau 970b77abaf Make type a part of ExpressionInfo 2021-03-22 15:17:00 -04:00
Dzmitry Malyshau 1d3f2bbdb1 Merge FunctionAnalysisError into FunctionError 2021-03-22 15:17:00 -04:00
Dzmitry Malyshau 1b3e7294fd Move type validation into a sub-module 2021-03-21 22:27:32 -04:00
Dzmitry Malyshau 1ddea0fdbb Validate layouts 2021-03-21 22:27:32 -04:00
Dzmitry Malyshau e3ae5904ba Move AnalysisFlags into ValidationFlags, add bits for expressions and blocks 2021-03-20 22:25:49 -04:00
Dzmitry Malyshau c992e638fe Move all the validation into a separate meta-module 2021-03-20 22:25:49 -04:00