Dzmitry Malyshau
59d1dcab5b
Support width changes in As expression
2021-05-08 21:20:23 -04:00
Dzmitry Malyshau
990fd2d3a3
Allow matrix indexing behind a pointer
2021-05-05 09:34:12 -04:00
Dzmitry Malyshau
9fe75ed7f1
Barriers
2021-05-04 22:16:24 -04:00
Gordon-F
dbfc11a196
[glsl-out] Fix writing identifiers starting with gl_
2021-05-03 21:47:16 -04:00
Ashley Ruglys
33003d8ea2
Add MathFunction::Refract
2021-04-26 14:14:30 -04:00
Dzmitry Malyshau
e8c5242cc7
Fix relational expression type width
2021-04-25 12:57:59 -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
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
d3b39d9e58
Splat expression in the IR
2021-04-14 19:26:20 -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
5673603bab
[spv-out] flip position Y
2021-04-03 11:27:21 -04:00
Dzmitry Malyshau
4389a86787
Fix layout roundup
2021-04-03 00:41:32 -04:00
Dzmitry Malyshau
8ff27187d1
Fix matrix multiplication types
2021-04-01 15:49:37 -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
efcfa37634
Implement Index for Layouter
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
Dzmitry Malyshau
caee860b70
Make uniformity analysis optional
2021-03-20 22:25:49 -04:00
Dzmitry Malyshau
d5fbb193c3
Validate Select and Relational expressions
2021-03-19 10:39:54 -04:00
Dzmitry Malyshau
c2f70aaf80
Validate binary expressions
2021-03-19 10:39:54 -04:00
Dzmitry Malyshau
daab319dc0
Validate Expression::Compose
2021-03-19 10:39:54 -04:00
Dzmitry Malyshau
d58f9bdfde
Merge sample mask in/out builtins
2021-03-18 21:57:48 -04:00
Dzmitry Malyshau
67ca0e7e7f
First bits of expression validation
2021-03-18 11:43:00 -04:00
Dzmitry Malyshau
72ede02888
Reduce the typifier error sizes
2021-03-18 10:26:26 -04:00
Dzmitry Malyshau
6e71366bd3
Test typifier error sizes
2021-03-18 10:26:26 -04:00
Dzmitry Malyshau
a17ae022c6
Make analysis errors carry the function handle
2021-03-17 01:03:00 -04:00
Dzmitry Malyshau
259a56761f
Consider dynamic arrays to have at least 1 element for the layout
2021-03-16 22:08:06 -04:00
Dzmitry Malyshau
2b888e4c09
Detect the forward function calls
2021-03-16 22:08:06 -04:00
Dzmitry Malyshau
08eaad89db
Implement default layout in the IR and WGSL
2021-03-15 22:27:35 -04:00
Dzmitry Malyshau
7d47a1b585
[spv-in] re-order the functions for the IR
2021-03-15 09:35:13 -04:00
Dzmitry Malyshau
32a11752af
Rename FragCoord builtin into Position
2021-03-13 23:26:19 -05:00
Dzmitry Malyshau
ebcd815250
Update IR to have entry points with inputs/outputs
2021-03-13 23:26:19 -05:00
Dzmitry Malyshau
7ebd96b597
Fix uniformity requirements of emitted expressions
2021-03-12 16:21:08 -05:00
Dzmitry Malyshau
dd273e254a
Distinguish between expression uniformity and function uniformity
2021-03-11 10:14:47 -05:00
Dzmitry Malyshau
f5ee791912
More error information for uniformity analysis
2021-03-09 22:54:03 -05:00
Dzmitry Malyshau
d433ee81e6
Relax array and block structure validation
2021-03-09 09:55:17 -05:00
Dzmitry Malyshau
13d7a353e0
Switch entry points from map to a vec
2021-03-07 12:11:49 -05:00
Dzmitry Malyshau
6afd72b8dd
Relax interpolation validation for vertex outputs
2021-03-06 23:41:53 -05:00
Dzmitry Malyshau
2045a4a7be
Use BOOL_WIDTH everywhere
2021-03-06 11:01:14 -05:00
Dzmitry Malyshau
dd823a4b84
Enforce pointer semantics at the type level.
2021-03-06 11:01:14 -05:00
Dzmitry Malyshau
2c67d1873f
Remove the Interface processor
2021-03-02 21:50:06 -05:00
Dzmitry Malyshau
89e37d6e90
Explicitly emit expressions by Statement::Emit
2021-03-02 21:50:06 -05:00
Anthony Cowley
822be23f35
Validate signed integer array size constants ( #517 )
...
Until we have some amount of type inference, an integer literal used as a constant array size must have a `u` suffix. This is inconsistent with the surface syntax presented in the spec, and is a minor inconvenience.
For now, allow a signed integer array size to pass validation so that user code need not change when type inference deduces values of the correct type.
2021-02-24 12:47:02 -05:00
Dzmitry Malyshau
0cefc1c46c
Remove mutation from the Call expression
2021-02-22 23:37:26 -05:00
Dzmitry Malyshau
d3062a2f3b
Statement validation
2021-02-22 15:36:25 -05:00
Dzmitry Malyshau
c0d5a6bde4
Rewrite the type validation
2021-02-22 10:12:09 -05:00