Commit Graph
128 Commits
Author SHA1 Message Date
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
Dzmitry Malyshau 3aa11838c7 Refactor the global usage code into a separate module, fix inheriting from the callees 2021-02-10 11:02:56 -05:00
Dzmitry Malyshau 6f50ca6bee Push constant support 2021-02-07 11:54:56 -05:00
Dzmitry Malyshau 251f800825 Remove the typifier hack for void functions 2021-02-06 10:42:54 -05:00
Dzmitry Malyshau d949d58f7b Statement for void function call 2021-02-06 10:42:54 -05:00
João Capucho 647dd76dba Moved the ConstantSolver to the glsl frontend 2021-02-06 00:25:30 -05:00
João Capucho 88eee833d7 Add binary op support for the ConstantSolver 2021-02-06 00:25:30 -05:00
Dzmitry Malyshau 50f0ad6249 Image queries 2021-02-05 15:26:45 -05:00
Dzmitry Malyshau ac27a1abaa Don't break upon a void function in the typifier 2021-02-05 10:08:34 -05:00
tfgast 71fdaedcec FragDepth is a Write Property
FragDepth is written to in a fragment shader, not read.
2021-02-03 22:29:42 -05:00
João Capucho bb88aac937 Add matrix access to ConstantSolver 2021-02-02 11:17:34 -05:00
João Capucho fcbf2aa4c4 Add support for unary ops to the constant solver
Fix wrong result when casting to bool
Add tests
2021-02-02 11:17:34 -05:00
João Capucho 53bd721895 Add support for casts in constant expressions 2021-02-02 11:17:34 -05:00
João Capucho 68bbf00249 Added support for initalizers and constants 2021-02-02 11:17:34 -05:00
Dzmitry Malyshau 5def021b6e [spv] replace the internal type inferrence with the typifier (#403)
Also, fix the Typifier's handling of logical operations.
See https://github.com/gfx-rs/naga/pull/404 for v0.3 branch.
2021-02-01 09:33:28 -05:00
Dzmitry Malyshau cb36c642ea [wgsl] refactor constants processing, add support for array sizes 2021-01-31 18:27:08 -05:00
Dzmitry Malyshau 3b9f517446 [mtl] implement continuing, fix Greater op and scoping 2021-01-30 15:14:38 +01:00
Dzmitry Malyshau ea64ab0431 Check host shared decorations in the validator 2021-01-29 21:22:04 +01:00