Commit Graph

553 Commits

Author SHA1 Message Date
Pelle Johnsen
6c8cdea936 [glsl-in] Check number of function args 2020-12-23 14:54:53 -05:00
Pelle Johnsen
7d9054f2c1 [glsl-in] Implement more MathFunctions 2020-12-23 14:54:53 -05:00
Pelle Johnsen
9a51d82c39 [glsl-in] Implement ceil
Related to #330
2020-12-23 14:54:53 -05:00
Pelle Johnsen
511000d022 [glsl-in] Extract function logic out of parser 2020-12-23 14:54:53 -05:00
Capucho
3f7ee8cd6e Generate locations with fixed naming scheme for linking 2020-12-22 13:02:22 -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
300aa61de0 [spv] improves division and modulo operators 2020-12-19 15:41:45 +01:00
Dzmitry Malyshau
c0dfb247b6 Sizing processor 2020-12-18 16:11:12 -05:00
Dzmitry Malyshau
b95346877a Remove MemberOrigin in favor of spans 2020-12-18 16:11:12 -05:00
Dzmitry Malyshau
fca72fd333 [wgsl] avoid recursion in token parsing 2020-12-18 16:11:12 -05:00
Dzmitry Malyshau
583f218c9d
Fix SPIR-V global binding check, add GLES 320 support (#333) 2020-12-15 09:31:08 -05:00
Pelle Johnsen
6bb40ce27b
[glsl-in] Cast gl_VertexIndex to SInt (#332)
* [glsl-in] Cast gl_VertexIndex to SInt

* [glsl-in] Use conversion cast (gl_VertexIndex)

- Also cast gl_InstanceIndex

* [glsl-in] Simplify global var lookup

* [glsl-in] Fix missing comma
2020-12-15 09:24:48 -05:00
Dzmitry Malyshau
77657b4c76 Add skybox example snapshots 2020-12-13 10:20:57 -05:00
Dzmitry Malyshau
899a918bf2 [convert] allow entry point name for GLSL output 2020-12-13 10:20:57 -05:00
Dzmitry Malyshau
f1ad97b049 [glsl-out] fix type conversion 2020-12-13 10:20:57 -05:00
Dzmitry Malyshau
018dfd6d29 [msl] fix metal namespacing, matrix construction and indexing 2020-12-13 10:20:57 -05:00
Dzmitry Malyshau
933ca3863b [spv] simplify the composing expression 2020-12-13 00:45:55 -05:00
Dzmitry Malyshau
96dcf8bd05 [spv] make the storage classes consistent across the expressions 2020-12-13 00:45:55 -05:00
Dzmitry Malyshau
2781705bef [spv] enforce the load/store semantics consistently 2020-12-13 00:45:55 -05:00
Dzmitry Malyshau
a6240b4988 [spv] support transpose and access index on matrices 2020-12-13 00:45:55 -05:00
Dzmitry Malyshau
98857f09a2 Move Transpose into math functions 2020-12-13 00:41:23 -05:00
Dzmitry Malyshau
2d1006835a Fix WGSL variable storage classes, spv-out interface 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
087b5555a6 Add tests for GLSL parsing 2020-12-13 00:41:23 -05:00
Dzmitry Malyshau
0efd6e75d7 [wgsl] update texture definitions and storage access
Add more tests, enhance the snapshot testing.
2020-12-12 12:46:24 -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
Joshua Groves
d18b73c3a7 Remove duplicate wgsl from test-data 2020-12-10 19:07:08 -05:00
Timo de Kort
6a6e3c28f9 Update simple.wgsl to latest syntax 2020-12-10 23:38:59 +01:00
Dzmitry Malyshau
b7744a1ec5 [wgsl] function lookup, improve error reporting 2020-12-10 10:20:56 -05:00
Dzmitry Malyshau
82c5cff605 [wgsl] refactor type declarations and function calls to avoid backups 2020-12-10 10:20:56 -05:00
Dzmitry Malyshau
eeb479ae94 [wgsl] support const locals 2020-12-10 10:20:56 -05:00
Dzmitry Malyshau
edf5d857b1 Add workgroup id and size builtins 2020-12-10 09:38:56 -03:30
Joshua Groves
d71ebe2881 Add snapshots for function.wgsl 2020-12-10 00:24:07 -05:00
Joshua Groves
51cdb0403a Add snapshots for simple.wgsl 2020-12-10 00:24:07 -05:00
Joshua Groves
9a625a570e Add insta prototype 2020-12-10 00:24:07 -05:00
Dzmitry Malyshau
b35e901249 Add all standard library functions to the IR 2020-12-09 15:43:36 -05:00
Dzmitry Malyshau
66d994566c [spv] force treating the built-in scalar types as unsigned 2020-12-08 22:55:21 -05:00
Dzmitry Malyshau
6c1f4ac590 [wgsl] populate standard functions 2020-12-08 09:28:24 -05:00
Dzmitry Malyshau
5786aac9c4 [glsl] enable conversion testing for quad and boids 2020-12-08 09:25:59 -05:00
Dzmitry Malyshau
148fac0601 [spv] enable quad conversion test, refactor binary operations 2020-12-08 09:25:59 -05:00
Dzmitry Malyshau
548bafaf40 [spv] refactor local variables 2020-12-08 09:25:59 -05:00
Dzmitry Malyshau
31be5402bd [spv] refactor the capability checks 2020-12-08 09:25:59 -05:00
Dzmitry Malyshau
4f958bf658 [msl] refactor function call parsing 2020-12-06 23:30:52 -05:00
Dzmitry Malyshau
e0c2178b3f [spv] write down workgroup size 2020-12-06 23:24:06 -05:00
Dzmitry Malyshau
b597bc5af6 [wgsl] add min/max support 2020-12-06 11:54:19 -05:00
Dzmitry Malyshau
ef4e8cacf9 [spv] refactor binary operators, add module and addition 2020-12-06 17:43:15 +01:00
Dzmitry Malyshau
5b14e26659 [wgsl] add a test module with units for if/loop/switch statements 2020-12-05 11:29: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