Commit Graph
362 Commits
Author SHA1 Message Date
Dzmitry Malyshau e3818bb236 [spv-in] fix treating OpPhi variables as pointers 2021-03-17 01:03:00 -04:00
Dzmitry Malyshau 9846a85174 [spv-in] patch calls from the entry points 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
Matúš Talčík 889e487b62 spv-in: fix classification of back edges
fix clippy

another fix
2021-03-15 11:09:53 -04:00
Dzmitry Malyshau 7d47a1b585 [spv-in] re-order the functions for the IR 2021-03-15 09:35:13 -04:00
Dzmitry Malyshau 20979b4800 [wgsl] type inference for constants 2021-03-15 01:31:57 -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 9e5cc4c9e4 Prevent matching on a reference once and for all 2021-03-12 11:35:09 -05:00
Dzmitry Malyshau e7c1415ca4 [spv-in] really consider variables as pointers 2021-03-09 10:10:10 -05:00
Dzmitry Malyshau 7c26320cce [spv-in] defer function call patching to the end of the module 2021-03-09 10:10:10 -05:00
Dzmitry Malyshau 13d7a353e0 Switch entry points from map to a vec 2021-03-07 12:11:49 -05:00
Dzmitry Malyshau e92b35725c [spv-in] work around integer built-ins for compute 2021-03-06 23:11:14 -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
Joshua Groves 667f01ce17 [wgsl-in] Add descriptions for more errors 2021-03-04 00:10:58 -05:00
Joshua Groves 764bec5322 [wgsl-in] Expose location of parser errors 2021-03-03 10:26:47 -05:00
Dzmitry Malyshau 89e37d6e90 Explicitly emit expressions by Statement::Emit 2021-03-02 21:50:06 -05:00
Dzmitry Malyshau 69bf7f5f17 Miscellaneous fixes 2021-03-01 09:35:29 -05:00
Dzmitry Malyshau 96527290f3 [wgsl-in] encapsulate logic into parse_statement_restricted 2021-03-01 09:35:29 -05:00
Matúš Talčík 34c549d49d spv-in flow: fix loop 2021-03-01 09:27:44 -05:00
Joshua Groves bb7105387d [wgsl-in] Use codespan to report errors 2021-02-28 00:07:37 -05:00
Matúš Talčík 53f7f9de92 spv-in: fix if branches in CFG
format
2021-02-26 09:18:10 -05:00
Dzmitry Malyshau 7c2f4eac2e [spv] fix unsigned selector and bitcast 2021-02-26 09:17:32 -05:00
Dzmitry Malyshau cb45cd9011 [spv-in] dump the flow graph before it's serialized 2021-02-25 10:05:21 -05:00
Pelle Johnsen 51cbd4c112 [glsl-in] Add initial support for glslpp-rs (#513)
* [glsl-in] Add initial support for glslpp-rs

* [glsl-in] Add remaining Punct mappings

Fix some tests.

* [glsl-in] Add basic error handling for glslpp-rs

* [glsl-in] Fix clippy issues

* [glsl.in] Add pp-rs floats

* [glsl-in] Remove old lex and preprocessor

* [glsl-in] Improve lexer token code

* [glsl-in] Rename lex_pp > lex

Also LexerPP > Lexer

* [glsl-in] glslpp-rs review feedback

* [glsl-in] Use rev for pp-rs dep

* [glsl-in] Parse on lexer err
2021-02-24 12:07:09 -05:00
Dzmitry Malyshau df14c4b7ca [spv-in] fix OpString and OpLine parsing 2021-02-24 09:10:26 -05:00
Joshua Groves 9c47a5fe17 [wgsl] Track token span for unexpected errors 2021-02-23 21:08:46 -05:00
Dzmitry Malyshau 0cefc1c46c Remove mutation from the Call expression 2021-02-22 23:37:26 -05:00
Matúš Talčík fa7d4d8b51 spv-in: fix if condition when merge node == false node
format
2021-02-20 10:41:54 -05:00
Dzmitry Malyshau 26e6c2bdac Use source attribute of errors 2021-02-19 22:10:25 -05:00
Systemcluster 9f113bdd95 [wgsl] limit allowed for statement initializer statements 2021-02-18 10:55:16 -05:00
Systemcluster e49910bb0a [wgsl] allow empty for statement headers 2021-02-18 10:55:16 -05:00
Dzmitry Malyshau 8a0382a89d Move global use flags into FunctionInfo 2021-02-17 15:37:37 -05:00
Pelle Johnsen 9f0cdfe9e5 [glsl-in] Multi entry, don't use find on hashmap 2021-02-17 10:05:40 -05:00
Pelle Johnsen 408002815f [glsl-in] Multi entry points - address comments 2021-02-17 10:05:40 -05:00
Pelle Johnsen 1861fca4ba [glsl-in] Support multiple entrypoints 2021-02-17 10:05:40 -05:00
Systemcluster 59479f137d [wgsl] support nested type parameters 2021-02-16 16:57:34 -05:00
Dzmitry Malyshau 847d127ec8 Optimize Interface with a bitmask to avoid re-visiting expressions 2021-02-16 09:08:05 -05:00
Systemcluster 539db1a317 [wgsl] support for statement 2021-02-15 23:51:19 -05:00
Dzmitry Malyshau e6251a23fe [wgsl] fix boolean types and bang parsing 2021-02-15 22:59:04 -05:00
Joshua Groves f42dc0c377 Fix some typos 2021-02-14 22:50:12 -05:00
Dzmitry Malyshau 61d711b58f Remove the Header from IR 2021-02-14 20:23:31 -05:00
Systemcluster 7a124550d4 [glsl-in] support inverse function 2021-02-14 12:34:26 -05:00
Systemcluster b642c5b89b [spv-in] support string instruction 2021-02-14 11:57:26 -05:00
Systemcluster dcd269782a [wgsl] restrict type casts to matching container types 2021-02-14 11:56:49 -05:00
Dzmitry Malyshau 18853ab149 Add warnings for trivial casts and clean them up in the code 2021-02-14 11:55:35 -05:00
Dzmitry Malyshau 8e96085caf [spv-in] support image load/store ops 2021-02-14 11:55:35 -05:00
Dzmitry Malyshau de5bd77279 ImageStore statement in IR 2021-02-14 11:55:35 -05:00
Dzmitry Malyshau c1fc5d6424 [msl] re-use expression results based on the analysis 2021-02-14 01:19:15 -05:00