Dzmitry Malyshau
0cc22c8c65
[spv-in] move the matrix decoration handling to structure parsing
2021-04-09 11:22:13 -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
LaughingMan
d0d9e09cdb
[spv-in] Copy less bytes in parse_function
...
The initial intention was to make the code a little more elegant and match on
the Vec itself instead of its length, however there's also a - probably
minuscule - performance advantage:
`Vec::remove` internally copies the removed element onto the stack. In this case
that's a `StructMember` weighting 48 bytes. The `Binding` we are actually
interested in is only 8 bytes tough.
Cloning just the `Binding` saves us from copying 40 bytes for nothing.
2021-04-08 13:10:56 -04:00
Dzmitry Malyshau
ead052b773
[spv-in] add a flag to adjust the coordinate space
2021-04-03 11:27:21 -04:00
Dzmitry Malyshau
ab54f683be
[spv-in] flip Y axis
2021-04-03 11:27:21 -04:00
Dzmitry Malyshau
427d8dc1eb
[spv-in] pre-emit constant expressions
2021-03-31 23:17:19 -04:00
Dzmitry Malyshau
057fa336a8
[spv-in] derivative ops
2021-03-29 11:07:33 -04:00
Dzmitry Malyshau
f06583ca7d
[spv-in] change const indexes to signed int
2021-03-29 11:07:33 -04:00
Dzmitry Malyshau
e47ff2dc26
[spv-in] support output interface block
2021-03-27 10:52:00 -04:00
Dzmitry Malyshau
7d042337e2
Align the block decoration with SPIR-V, require storage buffers
2021-03-25 12:34:25 -04:00
Dzmitry Malyshau
4fb4133298
[spv-in] fix image array index type to be signed
2021-03-25 09:21:58 -04:00
Dzmitry Malyshau
26f629ccb4
[spv-in] fix image operand iteration, add support for constant offsets
2021-03-25 09:21:58 -04:00
Dzmitry Malyshau
c8bac4b618
[spv-in] convert the shift to unsigned
2021-03-25 09:21:58 -04:00
Dzmitry Malyshau
d58f9bdfde
Merge sample mask in/out builtins
2021-03-18 21:57:48 -04:00
Dzmitry Malyshau
f18728ed92
Enable more SPIR-V capabilities in the frontend
2021-03-17 16:33:21 -04:00
Dzmitry Malyshau
a17ae022c6
Make analysis errors carry the function handle
2021-03-17 01:03:00 -04:00
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
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
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
Matúš Talčík
34c549d49d
spv-in flow: fix loop
2021-03-01 09:27:44 -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
Dzmitry Malyshau
df14c4b7ca
[spv-in] fix OpString and OpLine parsing
2021-02-24 09:10:26 -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
Dzmitry Malyshau
8a0382a89d
Move global use flags into FunctionInfo
2021-02-17 15:37:37 -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
b642c5b89b
[spv-in] support string instruction
2021-02-14 11:57:26 -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
de39e7f4d1
[spv-in] patch function calls before deriving the global use
2021-02-13 12:33:15 -05:00
Dzmitry Malyshau
38f3c4eb19
[spv-in] support dynamic vector insert/extract
2021-02-11 10:58:52 -05:00
Dzmitry Malyshau
49eb93cf7d
[spv-in] support boolean constants
2021-02-11 10:58:52 -05:00
Dzmitry Malyshau
2507794bc6
[spv-in] add more capabilities we support
2021-02-11 10:58:52 -05:00