Commit Graph

380 Commits

Author SHA1 Message Date
Dzmitry Malyshau
986550aff8 [wgsl] fix and update storage load 2021-01-26 15:57:48 -05:00
Dzmitry Malyshau
ce15aa62fc [spv] indexing values 2021-01-26 15:36:30 -05:00
Joshua Groves
d7225b4eb6 [glsl-out] Improve formatting of whitespace 2021-01-25 23:57:54 -05:00
Joshua Groves
58f38ba61d [msl-out] Improve formatting of whitespace 2021-01-25 23:57:54 -05:00
Dzmitry Malyshau
a5184fba49 Check for the block decorator in the validator 2021-01-25 09:06:32 -05:00
Dzmitry Malyshau
c803240587 [wgsl] resolve types across functions 2021-01-25 00:59:30 -05:00
Dzmitry Malyshau
2bdcacc2b0 Update MSRV to 1.43 2021-01-24 21:14:59 -05:00
Dzmitry Malyshau
98c18d71db Switch to column major 2021-01-24 21:14:59 -05:00
Dzmitry Malyshau
0ea8a0a3c2 [wgsl] support unsigned literals 2021-01-23 10:03:25 -05:00
Dzmitry Malyshau
5b35b04546 Remove rosetta tests 2021-01-23 10:02:07 -05:00
Timo de Kort
6ffd68d6a2 [spv-out] Add comparison operators 2021-01-22 22:28:21 -05:00
Dzmitry Malyshau
c758399354 Add a collatz snapshot test 2021-01-22 08:58:02 -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
sotrh
92f970a69d
Change ErrorKind::SemanticError to use Cow<'static, str> instead of &'static str (#356)
* Changed front::glsl::error::ErrorKind::Semantic to use Cow

* cargo fmt

* appeasing clippy

* Update src/front/glsl/functions.rs

Co-authored-by: monocodus[bot] <49363530+monocodus[bot]@users.noreply.github.com>

* Fixed more clippy errors

Co-authored-by: Dzmitry Malyshau <kvark@fastmail.com>
Co-authored-by: monocodus[bot] <49363530+monocodus[bot]@users.noreply.github.com>
2021-01-15 09:33:48 -05:00
Dzmitry Malyshau
6f5ff27701 Sample mask support 2021-01-15 01:08:15 -05:00
Pelle Johnsen
61d624c82e
[glsl-in] Implement function call (#354) 2021-01-13 08:07:43 +01:00
Dzmitry Malyshau
73cb6d4bdf [spv] Relax decoration checks for global variables 2021-01-11 09:32:27 -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
4e5b39f452 [spv] indexing arrays 2021-01-08 23:28:08 -05:00
Dzmitry Malyshau
bd998f6c32 Validate constant array sizes 2021-01-07 15:04:31 -05:00
Jay Oster
3bf7f41068 WGSL // comments
- Update parser to match the latest spec: https://github.com/gpuweb/gpuweb/pull/1326
2021-01-06 09:19:46 -05:00
Pelle Johnsen
6710f5954e Fix clippy issues 2021-01-04 09:51:32 -05:00
Pelle Johnsen
e062096a6a [spv-out] Handle import id for GLSL.std.450 2021-01-04 09:51:32 -05:00
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