Commit Graph
145 Commits
Author SHA1 Message Date
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
Dzmitry Malyshau 2a5c478b21 Fix type resolves of matrix by vectors 2021-02-20 00:02:28 -05:00
Dzmitry Malyshau 26e6c2bdac Use source attribute of errors 2021-02-19 22:10:25 -05:00
Dzmitry Malyshau 0e3f745fb2 [msl] derive thiserror 2021-02-19 16:56:45 -05:00
Dzmitry Malyshau db0a8875d9 TypifyError with the expression handle 2021-02-19 16:56:45 -05:00
João Capucho 19e7f456c4 Remove the call graph processor
Uses the GlobalUse in glsl-out to check for function availability
2021-02-18 11:43:18 -05:00
Dzmitry Malyshau 5f21cf360f Refactor snapshot testing to include some IR 2021-02-18 10:19:25 -05:00
Dzmitry Malyshau 4c5a1ba054 Global usage tests in the analyzer 2021-02-17 16:22:19 -05:00
Dzmitry Malyshau 8a0382a89d Move global use flags into FunctionInfo 2021-02-17 15:37:37 -05:00
Dzmitry Malyshau 847d127ec8 Optimize Interface with a bitmask to avoid re-visiting expressions 2021-02-16 09:08:05 -05:00
Dzmitry Malyshau 35ba4dac66 Fix the ClipDistance validation - expect an array 2021-02-16 09:08:05 -05:00
Joshua Groves f42dc0c377 Fix some typos 2021-02-14 22:50:12 -05:00
Dzmitry Malyshau ad423124c0 Support constants in the naming processor 2021-02-14 20:43:50 -05:00
Systemcluster 7a124550d4 [glsl-in] support inverse function 2021-02-14 12:34:26 -05:00
Dzmitry Malyshau de5bd77279 ImageStore statement in IR 2021-02-14 11:55:35 -05:00
Dzmitry Malyshau 08001981ba Add comments to Analysis methods and ControlFlags 2021-02-14 01:19:15 -05:00
Dzmitry Malyshau c1fc5d6424 [msl] re-use expression results based on the analysis 2021-02-14 01:19:15 -05:00
Dzmitry Malyshau eae40383d0 Add uniform control flow analysis to the validator 2021-02-14 01:19:15 -05:00
Dzmitry Malyshau bde43cbec6 First uniform control flow tests 2021-02-14 01:19:15 -05:00
Dzmitry Malyshau 747040ee8a Analyzer processor - first draft 2021-02-14 01:19:15 -05:00
Dzmitry Malyshau 38f3c4eb19 [spv-in] support dynamic vector insert/extract 2021-02-11 10:58:52 -05:00