Commit Graph
101 Commits
Author SHA1 Message Date
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
Dzmitry Malyshau a5184fba49 Check for the block decorator in the validator 2021-01-25 09:06:32 -05:00
Dzmitry Malyshau 04b0f2443e Validate local and argument types 2021-01-22 08:58:02 -05:00
Dzmitry Malyshau b441a25956 Rename GlobalUse variants 2021-01-22 08:58:02 -05:00
Dzmitry Malyshau bc66f784c1 Refactor builtin usage validation 2021-01-22 08:58:02 -05:00
Dzmitry Malyshau da51f29d42 [spv] emit proper member layout decorations (#360) 2021-01-22 08:54:28 -05:00
Dzmitry Malyshau 6f5ff27701 Sample mask support 2021-01-15 01:08:15 -05:00
Dzmitry Malyshau c6658e775d Typifier support for vector * matrix multiplication 2021-01-09 21:06:28 -05:00
Dzmitry Malyshau 08b6c416a3 Unlock arbitrary binding indices in the validator 2021-01-09 20:59:51 -05:00
Dzmitry Malyshau bd998f6c32 Validate constant array sizes 2021-01-07 15:04:31 -05:00
Dzmitry Malyshau 001336b457 Tidy up constants IR 2020-12-20 17:42:00 +01:00
Dzmitry Malyshau 1e70432691 [validator] refactor type checks into a function 2020-12-20 17:42:00 +01:00
Dzmitry Malyshau c0dfb247b6 Sizing processor 2020-12-18 16:11:12 -05:00
Dzmitry Malyshau 98857f09a2 Move Transpose into math functions 2020-12-13 00:41:23 -05:00
Dzmitry Malyshau 211bec44a1 Improve texture sampling IR, update WGSL parsing of it 2020-12-13 00:41:23 -05:00
Dzmitry Malyshau dafca34877 Add block boolean to the structure types in IR
Also update WGSL syntax for structures.
Move the boids code into snapshots.
2020-12-12 12:46:24 -05:00
Dzmitry Malyshau edf5d857b1 Add workgroup id and size builtins 2020-12-10 09:38:56 -03:30
Dzmitry Malyshau b35e901249 Add all standard library functions to the IR 2020-12-09 15:43:36 -05:00
Dzmitry Malyshau f7ca7f2aff Refactor Switch statement, implement on WGSL 2020-12-05 00:22:39 -05:00
Dzmitry Malyshau 5fe9429a63 Terminator processor, used in WGSL and GLSL frontends 2020-12-04 17:23:13 -05:00
Dzmitry Malyshau f18443a79d Validate builtin types 2020-12-04 16:13:14 -05:00
Capucho dd5021234d [glsl-out] Reworked the backend
The backend now works in a similar way to the msl backend
Should require less loops, allocations and backtracking
Overall just better to work with it

Added a build script which reads a file with the glsl keywords and
generates a slice to be used in the Namer

Added a way to build a call graph
2020-11-22 14:45:12 -05:00
Dzmitry Malyshau 4ed91330cf Derive PartialEq for validation errors 2020-11-19 23:19:10 -05:00
Dzmitry Malyshau 5e77653c55 [ir] select expression 2020-11-12 17:43:33 +01:00
Dzmitry Malyshau 8b56f3ef96 [ir] support function argument names (#270) 2020-11-11 21:34:37 +01:00
Dzmitry Malyshau a54800afc1 Naming processor, used for [msl] 2020-11-11 12:39:42 -05:00
Dzmitry Malyshau ac5e91b31a Fix and refactor the constant array sizes 2020-11-11 08:02:06 -05:00
Dzmitry Malyshau 41b3865e5b Make variable initializers to be const 2020-11-04 16:38:55 -05:00