Commit Graph

345 Commits

Author SHA1 Message Date
Dzmitry Malyshau
46a244fff0 [wgsl-in] remove lifetime from ParseError 2021-05-02 23:49:34 -04:00
Timo de Kort
05d3608737
HLSL CI (#788)
* Add validation-windows yml for HLSL

Add workgroup size to hlsl-out

* Update Readme with Make target information

* Change runs on to windows-latest

* Remove snapshot file
2021-05-02 11:29:35 -04:00
Lachlan Sneff
232fd65ec7
Add support for retrieving array length in msl backend (#806)
* Add support for arrayLength to the wgsl frontend

* Fix clippy warning

* Add draft support for array length to the msl backend

* Finalize support for array length in msl

* Convert buffer size to array length in msl backend

* Fix clippy warning

* Fix misleading documentation

* Changes based on review of PR

* Use a fake binding for sizes buffer in msl backend if necessary

* Only generate the msl buffer size structure if globals are present that have unsized arrays

* Make sure to generate separators

* Replace uses_unsized_buffers with !self.runtime_sized_buffers.is_empty()

* Clear self.runtime_sized_buffers

* Run snapshot of shadow.msl

* Add Expression::ArrayLength support to the spirv backend

* Remove wgsl target from the access snapshot test

* Update access.msl snapshot

* Update stack size for msl backend

* Update stack size again for msl backend
2021-04-30 22:40:32 -04:00
Dzmitry Malyshau
992bdd83ce
Report per-entry point translation errors in the MSL output snapshots (#808) 2021-04-30 13:38:20 -04:00
Ashley
d21dded649
[msl-out] wrap arrays in structs so that they can be returned by functions (#764)
* [msl-out] wrap arrays in structs so that they can be returned by functions

* Fix clippy problems

* use a raw array for output fields

* Fix clippy problems

* Apply suggestions

* Remove put_initialization_component

* Check if the array is a constant size

* Don't use the pointer class
2021-04-28 10:26:17 -04:00
Dzmitry Malyshau
120fc22e9f Support unary not in WGSL 2021-04-27 01:24:21 -04:00
Igor Shaposhnik
452db33947 [glsl-out] Enable boids snapshot test 2021-04-26 09:59:05 -04:00
Gordon-F
dd1d9fe290 [wgsl-out] More improvements. Enable quad snapshot testing for wgsl backend 2021-04-26 00:20:01 -04:00
Dzmitry Malyshau
117d729ff8 [spv-in] allow non-strict check for capabilities 2021-04-25 18:32:34 -04:00
Dzmitry Malyshau
3049e3a4ac [spv-out] allow capabilities to be derived 2021-04-25 13:34:16 -04:00
Dzmitry Malyshau
1cc770a7d8 [spv-out] return Null by default 2021-04-25 01:07:59 -04:00
Gordon-F
3accf4dc15 Improve wgsl-out 2021-04-23 16:36:49 -04:00
Dzmitry Malyshau
02105db045
[spv-out] image queries (#749) 2021-04-23 12:31:33 -04:00
Dzmitry Malyshau
a2e5284f82
WGSL trailing commas (#743)
* [wgsl-in] typedef Span

* [wgsl-in] trailing comma for case list

* [wgsl-in] trailing comma for constructors

* Review fixes
2021-04-21 22:38:26 -04:00
Dzmitry Malyshau
bc344579e8
[spv-in] fix signed/unsigned casting for builtins (#746) 2021-04-21 11:04:53 -04:00
Ashley
4664cd301a
[Metal] Wrap a packed_float3 with float3 when loading from struct (#740)
* Implement the wrapping in Expression::Load instead

* Add changes to stack size

* stable and nightly can't seem to agree on a stack size

* Apply suggestions

* Add a comment about unexpected path

* Update skybox snapshot

* should_pack_struct_member returns an Option<ScalarKind>

* Remove accidental file
2021-04-21 09:16:11 -04:00
Dzmitry Malyshau
5d1746b0b4
Swizzle expression (#734) 2021-04-20 22:03:54 -04:00
Ashley
b08dfe5146
[Metal] Impl Expression::Splat (#738)
* [Metal] Impl `Expression::Splat`

* Add changes to the snapshots

* Apply suggestions
2021-04-20 11:41:13 -04:00
Ashley Ruglys
a4ac7b38b2 Don't use an interpolation on fake bindings 2021-04-20 10:51:45 -04:00
Gordon-F
c37ae5e2a0 [glsl-out] Use fmt::Writer instead of io::Writer 2021-04-20 09:09:35 -04:00
Jim Blandy
9cd6fd9c20 [msl-out]: Generate interpolation qualifiers. 2021-04-19 09:42:00 -04:00
Jim Blandy
4f442ff8cc Require binding interpolation to be resolved by the front end.
When validating IR, verify that all `Binding`s for vertex shader outputs and
fragment shader inputs, whether directly in the argument or result, or applied
to a struct member, has specified an interpolation and sampling, not `None`.
This ensures that front ends explicitly state their policies, rather than
coasting through on back ends' default behavior.

In practice, all our front ends have very similar defaults, so provide a utility
function on `Module` to apply these rules. Use this utility function in the
SPIR-V and WGSL front ends; GLSL seems to already fill in interpolation as
required.
2021-04-19 09:42:00 -04:00
Jim Blandy
0910af2718 [wgsl-in] Implement WGSL interpolate syntax from gpuweb PR #1605.
Fixes: #670
2021-04-19 09:42:00 -04:00
Jim Blandy
99a9e1e78e Change Binding::Location to a struct-style enum variant.
This commit makes no other changes. This is in preparation for adding a third
field, at which point tuple variants start to get obscure.
2021-04-19 09:42:00 -04:00
Igor Shaposhnik
ce0720ac61
Add wgsl-out into test infrastructure (#730) 2021-04-19 09:19:03 -04:00
Dzmitry Malyshau
62c2cf7332
Validate composite constants (#729) 2021-04-18 23:19:09 -04:00
Lachlan Sneff
4cbef59dd6
Add struct instantiation support to wgsl-in (#507)
* Add struct instantiation support to wgsl-in

* Readd type matching and move struct test

* rebase onto master and update tests

* Update tests to upstream

* Fix merge errors

* Rebase onto master

* [wgsl-in] delay composite type creation

* Use the new WGSL construction syntax in the tests

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-04-17 01:14:07 -04:00
Dzmitry Malyshau
bb716f9c10
[spv-out] implement array value indexing (#723) 2021-04-16 17:11:18 -04:00
Dzmitry Malyshau
daf4c82376
Allow stepping on floats in the validator (#724) 2021-04-16 16:16:15 -04:00
Ashley
285a855e19
Impl Hash for msl::Options (#716)
* Impl `Hash` for `msl::Options`

* Remove ordered float

* [msl] derive everything on Options manually

* [msl] switch from Arena to Vec for the options

* Fix the clippy error by allowing derive_hash_xor_eq

* Fix skybox test

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-04-16 14:11:26 -04:00
Jim Blandy
2eb3e81e19 [wgsl-in] Add basic test for interpolate attribute. 2021-04-15 17:19:20 -04:00
Jim Blandy
3f958f618b [glsl-out] Let snapshot tests request a specific GLSL desktop version.
Add a Option<u16> to the snapshot `Params` to let snapshots request specific
Desktop GLSL versions. The default is GLSL ES 3.10.

It would be more general to let the params select any GLSL version, but that
would entail making glsl::Version implement Deserialize and all that, which
seems like overkill.
2021-04-15 17:19:20 -04:00
Dzmitry Malyshau
2eae37f7e5 [spv-out] rename temp_chain to temp_list, run a cargo fmt pass 2021-04-14 19:26:20 -04:00
Dzmitry Malyshau
96f9cb4ce1 [wgsl] Add support for simplified vector construction, add a snapshot test 2021-04-14 19:26:20 -04:00
Dzmitry Malyshau
c8d26a1f47 Splat support for WGSL and SPV in/out, updated snapshots 2021-04-14 19:26:20 -04:00
Dzmitry Malyshau
c2c93e4ecd Remove cargo-insta 2021-04-14 16:10:31 -04:00
Dzmitry Malyshau
3f57e4db5a Enable texture-array snapshot on Metal 2021-04-13 01:31:57 -04:00
Dzmitry Malyshau
270feb3c0f [msl] map push constants to buffers 2021-04-13 01:31:57 -04:00
Ashley
640bfb1f26
[Metal] Make constant composites non-constexpr (#707)
* Make constant composites non-constexpr

* Update shadow test
2021-04-11 14:21:47 -04:00
Timo de Kort
5d487941b2
Start hlsl-out (#408)
* Add hlsl-out feature

* Integrate hlsl-out with snapshots

* Add snapshot
2021-04-11 11:36:26 -04:00
Mehmet Oguz Derin
142038c85b WGSL: const to let 2021-04-11 01:24:19 -04:00
Dzmitry Malyshau
f3ba6e91c2 [msl-out] shorten the expression name 2021-04-09 00:48:18 -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
Dzmitry Malyshau
6166b95b6a [msl] inline some of the constants 2021-04-08 12:36:43 -04:00
Dzmitry Malyshau
2774dcb403 [msl] inline some of the types 2021-04-08 11:10:52 -04:00
Dzmitry Malyshau
e06451777e [msl] address review comments, rename SubOptions to PipelineOptions, add more inlined states 2021-04-07 22:49:13 -04:00
Dzmitry Malyshau
499f2e3cbe [msl] add a snapshot test for inline sampler 2021-04-07 22:49:13 -04:00
Dzmitry Malyshau
7c11759041 Re-use the MSL types in snapshot code 2021-04-07 22:49:13 -04:00
Dzmitry Malyshau
dcbedd17d0 [msl] basic infrastructure for inline samplers
Also move out "allow_point_size" into SubOptions to allow
main Options to not be cloned.
2021-04-07 22:49:13 -04:00
Dzmitry Malyshau
a9bde26785 [spv-out] fix incorrect dummy result 2021-04-04 10:25:46 -04:00
Dzmitry Malyshau
410c242daf [spv-out] add a flag to adjust the coordinate space 2021-04-03 11:27:21 -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
100c2f42ed [spv-out] cache access index constants 2021-04-03 11:27:21 -04:00
Dzmitry Malyshau
5673603bab [spv-out] flip position Y 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
4389a86787 Fix layout roundup 2021-04-03 00:41:32 -04:00
Dzmitry Malyshau
d4d9d7814f [msl-out] option to omit point size output 2021-04-02 00:19:52 -04:00
Dzmitry Malyshau
8ff27187d1 Fix matrix multiplication types 2021-04-01 15:49:37 -04:00
Dzmitry Malyshau
db455af04b Add a snapshot for image load/store ops 2021-04-01 10:47:28 -04:00
Dzmitry Malyshau
427d8dc1eb [spv-in] pre-emit constant expressions 2021-03-31 23:17:19 -04:00
Dzmitry Malyshau
7a17da195c [msl] use uint behind metal namespace only 2021-03-31 23:01:19 -04:00
Dzmitry Malyshau
7be524592a [msl] fix mutability of function parameters 2021-03-30 15:43:53 -04:00
Dzmitry Malyshau
baccfc68f5 [msl] fix constant array initialization 2021-03-30 00:38:00 -04:00
Dzmitry Malyshau
f06583ca7d [spv-in] change const indexes to signed int 2021-03-29 11:07:33 -04:00
Dzmitry Malyshau
f2155d49d1 [msl] fix initialization of arrayed members, enable METAL snapshot of quad-vert 2021-03-27 10:58:01 -04:00
Dzmitry Malyshau
e47ff2dc26 [spv-in] support output interface block 2021-03-27 10:52:00 -04:00
Dzmitry Malyshau
a090afa3f5 [msl] write scalar constants before the types 2021-03-26 09:56:29 -04:00
Dzmitry Malyshau
bf193bb535 [msl] don't put expressions in double scopes 2021-03-26 09:56:29 -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
e87f57d82c Fix expression validation check 2021-03-25 09:32:55 -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
06d777b609 Make layout validation optional, disable the struct size check 2021-03-24 21:03:00 -04:00
Dzmitry Malyshau
7a246f6a14 Validate image queries and valid shader stages for derivatives 2021-03-24 12:32:32 -04:00
Dzmitry Malyshau
8712020115 Move Layouter into ModuleInfo 2021-03-23 10:11:50 -04:00
Dzmitry Malyshau
970b77abaf Make type a part of ExpressionInfo 2021-03-22 15:17:00 -04:00
Dzmitry Malyshau
e3ae5904ba Move AnalysisFlags into ValidationFlags, add bits for expressions and blocks 2021-03-20 22:25:49 -04:00
Dzmitry Malyshau
c992e638fe Move all the validation into a separate meta-module 2021-03-20 22:25:49 -04:00
Dzmitry Malyshau
caee860b70 Make uniformity analysis optional 2021-03-20 22:25:49 -04:00
Dzmitry Malyshau
c2f70aaf80 Validate binary expressions 2021-03-19 10:39:54 -04:00
Dzmitry Malyshau
dd2cd92331 [msl-out] fix varying input structures 2021-03-17 16:59:23 -04:00
Dzmitry Malyshau
9390aa472d [glsl-out] make varying names to match 2021-03-17 10:37:10 -04:00
Gordon-F
6736bcefa6 [glsl-out] Explicitly set location bindings 2021-03-17 09:40:06 -04:00
Dzmitry Malyshau
665ac49a01 Show expression uniformity in the Dot backend 2021-03-17 01:03:00 -04:00
Dzmitry Malyshau
08eaad89db Implement default layout in the IR and WGSL 2021-03-15 22:27:35 -04:00
Dzmitry Malyshau
20979b4800 [wgsl] type inference for constants 2021-03-15 01:31:57 -04:00
Dzmitry Malyshau
ebcd815250 Update IR to have entry points with inputs/outputs 2021-03-13 23:26:19 -05:00
Dzmitry Malyshau
58a4e330dc [glsl-out] fix cached expressions 2021-03-13 11:52:23 -05:00
Dzmitry Malyshau
7ebd96b597 Fix uniformity requirements of emitted expressions 2021-03-12 16:21:08 -05:00
Dzmitry Malyshau
dd273e254a Distinguish between expression uniformity and function uniformity 2021-03-11 10:14:47 -05:00
Igor Shaposhnik
25fe522423 [glsl-out] Properly write array type 2021-03-10 15:17:07 -05:00
Dzmitry Malyshau
f5ee791912 More error information for uniformity analysis 2021-03-09 22:54:03 -05:00
Dzmitry Malyshau
e7c1415ca4 [spv-in] really consider variables as pointers 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
dd823a4b84 Enforce pointer semantics at the type level. 2021-03-06 11:01:14 -05:00
Igor Shaposhnik
d1c47d1705 [glsl-out] Set precision for image type 2021-03-05 23:10:16 -05:00
Igor Shaposhnik
50e5904add [glsl-out] Fix statement indentation 2021-03-04 10:03:39 -05:00
Joshua Groves
667f01ce17 [wgsl-in] Add descriptions for more errors 2021-03-04 00:10:58 -05:00
Dzmitry Malyshau
3fcc0759ed GraphViz backend 2021-03-03 21:20:12 -05:00
Dzmitry Malyshau
89e37d6e90 Explicitly emit expressions by Statement::Emit 2021-03-02 21:50:06 -05:00
Igor Shaposhnik
6e37f336bd [glsl-out] Set workgroup_size for compute shaders 2021-03-02 14:26:01 -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
Joshua Groves
bb7105387d [wgsl-in] Use codespan to report errors 2021-02-28 00:07:37 -05:00
Dzmitry Malyshau
0cefc1c46c Remove mutation from the Call expression 2021-02-22 23:37:26 -05:00
Dzmitry Malyshau
694a00afcb [spv-out] optimize if/else branching 2021-02-22 10:11:36 -05:00
Joshua Groves
ce84b1d1c0 [wgsl] Add parser error snapshot 2021-02-22 01:17:15 -05:00
Dzmitry Malyshau
99c1add358 [msl] fake bindings 2021-02-19 19:20:21 -05:00
João Capucho
19e7f456c4 Remove the call graph processor
Uses the GlobalUse in glsl-out to check for function availability
2021-02-18 11:43:18 -05:00
Dzmitry Malyshau
5f21cf360f Refactor snapshot testing to include some IR 2021-02-18 10:19:25 -05:00
Dzmitry Malyshau
8a0382a89d Move global use flags into FunctionInfo 2021-02-17 15:37:37 -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
Dzmitry Malyshau
6d0c608626 [glsl-out] use existing Analysis instead of implementing Visitor 2021-02-15 11:13:11 -05:00
Dzmitry Malyshau
ad423124c0 Support constants in the naming processor 2021-02-14 20:43:50 -05:00
Dzmitry Malyshau
61d711b58f Remove the Header from IR 2021-02-14 20:23:31 -05:00
Systemcluster
dcd269782a [wgsl] restrict type casts to matching container types 2021-02-14 11:56:49 -05:00
Systemcluster
5de69f7276 Specify line endings in ron snapshot tests 2021-02-14 11:29:25 -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
8183f4ff6f [spv-out] annotate function and constant names 2021-02-13 19:37:54 -05:00
Dzmitry Malyshau
38f3c4eb19 [spv-in] support dynamic vector insert/extract 2021-02-11 10:58:52 -05:00
Dzmitry Malyshau
20227e7c87 [msl] pass-through global resources in arguments 2021-02-10 23:22:14 -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
5b94ecd9b2 Add a snapshot for parsing spirv input 2021-02-08 15:59:47 -05:00
Dzmitry Malyshau
10867879d4 [spv-in] support projection sampling and sampling from arrays 2021-02-08 11:31:45 -05:00
Dzmitry Malyshau
680fda9e1b [spv-out] fix initial ID 0 and 1 assignments 2021-02-08 00:20:37 -05:00
Joshua Groves
31be7099f2 Move snapshot inputs and outputs around 2021-02-07 18:16:26 -05:00
Dzmitry Malyshau
6f50ca6bee Push constant support 2021-02-07 11:54:56 -05:00
Dzmitry Malyshau
11a3ed9837 WGSL support for void function calls 2021-02-06 10:42:54 -05:00
Dzmitry Malyshau
d949d58f7b Statement for void function call 2021-02-06 10:42:54 -05:00
Dzmitry Malyshau
c496c05ba4 Makefile commands for native shader validation 2021-02-05 14:04:02 -05:00
Dzmitry Malyshau
e05baa2889
[spv] put NonWritable on buffer variable itself (#405) 2021-02-01 20:17:50 -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
6138e4ddd3 [spv] fix block decoration on nested structs 2021-01-31 18:27:08 -05:00
Dzmitry Malyshau
cb36c642ea [wgsl] refactor constants processing, add support for array sizes 2021-01-31 18:27:08 -05:00
Dzmitry Malyshau
7c6835bdbc [spv] fix support for fixed-size array, refactor constant writes 2021-01-31 18:27:08 -05:00
Dzmitry Malyshau
1ec4c2b0d0 [spv] implement NonReadable/NonWritable decorations 2021-01-31 18:27:08 -05:00
Dzmitry Malyshau
15b629b750 [spv] put ColMajor on the struct member 2021-01-31 18:27:08 -05:00
Dzmitry Malyshau
0bbeec7d55 Add shadow snapshot shader 2021-01-30 15:14:38 +01:00
Dzmitry Malyshau
3b9f517446 [mtl] implement continuing, fix Greater op and scoping 2021-01-30 15:14:38 +01:00
Dzmitry Malyshau
162079c160 Enable collatz and boids testing for spv-out 2021-01-28 17:28:48 +01:00
Dzmitry Malyshau
ab2cf8b842 [wgsl] support vector type casts 2021-01-26 23:33:08 -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
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
Dzmitry Malyshau
c758399354 Add a collatz snapshot test 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
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
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
b95346877a Remove MemberOrigin in favor of spans 2020-12-18 16:11:12 -05:00
Dzmitry Malyshau
77657b4c76 Add skybox example snapshots 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
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
Dzmitry Malyshau
b7744a1ec5 [wgsl] function lookup, improve error reporting 2020-12-10 10:20:56 -05:00
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
66d994566c [spv] force treating the built-in scalar types as unsigned 2020-12-08 22:55:21 -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
31be5402bd [spv] refactor the capability checks 2020-12-08 09:25:59 -05:00
Dzmitry Malyshau
d190c6441f Add spv::write_vec helper. 2020-12-04 10:40:13 -05:00
Dzmitry Malyshau
529225ce4c
Option to dump spirv flow graphs (#249) 2020-10-30 16:44:59 -04:00
Dzmitry Malyshau
587dc01a2c [msl] refactor the options, add override stages 2020-10-28 00:30:22 -04:00
Pelle Johnsen
78c9e45182
[glsl-in] Add initial pre-processor (#238)
* [glsl-in] Add initial pre-processor

* [glsl-in] Tweak preprocessor after review

- Add IfState struct
- Use FastHashMap to pre-defines
- Use ok-or() for some errors

* [glsl-in] Remove Option in defines arg
2020-10-15 13:38:02 -04:00
Dzmitry Malyshau
541d1dcb8b Fix convert_phong_lighting test feature checks 2020-09-28 01:10:57 -04:00
Dzmitry Malyshau
14feb9ac01 Validation of global variables and entry points 2020-09-17 16:12:56 -04:00
Dzmitry Malyshau
081b90f117 Consolidate rosetta tests 2020-09-17 10:16:32 -04:00
Dzmitry Malyshau
2ebaadaf0c Refactor entry point IR 2020-09-17 10:08:49 -04:00
Dzmitry Malyshau
d6cc17f051 Refactor feature names 2020-09-15 07:51:45 -04:00
Dzmitry Malyshau
089d0dd4f8
Minor fixes in feature checks (#194) 2020-09-13 21:03:00 -04:00
Dzmitry Malyshau
b278e10ea7
[spirv-in] make pointers totally transparent (#187) 2020-09-11 12:19:55 -04:00
Pelle Johnsen
2ea0310b63
[glsl] Promote glsl-new to glsl (#184)
* [glsl] Promote glsl-new to glsl

* [glsl-in] rename feature glsl > glsl-in
2020-09-10 01:11:52 -04:00
Matus Talcik
b67739034e
Implement Execution Modes (#169)
Add documentation, make clippy happy


Compilation errors


Add some more docs


Few more compilation errors


Changes based on the review


glsl-new parser fix


Set default local size to (0, 0, 0)


final cleanup


Last design


New design
2020-08-31 14:34:38 -04:00
Dzmitry Malyshau
1b17030d05
Split wgsl into sub-modules, and gate by a feature (#165) 2020-08-27 23:30:53 -04:00
Kristoffer Søholm
6c062087fa
Initial GLSL constant evaluation implementation (#94)
Adds constant evaluation for addition, and uses it for globals and array
specifiers.
2020-07-09 20:52:13 -04:00
Dzmitry Malyshau
4a769c10b5 [spv] remove the pointer indirection to variables 2020-07-05 09:33:07 -04:00
Dzmitry Malyshau
e0a1e80fb5 Remove spirv-headers use from IR, make it optional 2020-06-25 00:37:33 -04:00
Dzmitry Malyshau
6eecea5dad First bits of IR validation 2020-06-24 23:17:52 -04:00
Gabriel Majeri
84615eead3
Add support for return value to SPIR-V backend (#79)
* Add test for `glsl_phong_lighting`

* Implement `ReturnValue` op for SPIR-V backend
2020-06-22 16:11:40 +02:00
João Capucho
f94b486d8b
Run cargo fmt and enable monocodus (#63) 2020-06-09 14:49:12 -04:00
Dzmitry Malyshau
55fab04353 Refactor the interface processor, many improvements in global variables handling in MSL 2020-03-19 22:36:26 -04:00
Dzmitry Malyshau
df855bc2ff Makefile and RON converter parameters 2020-03-19 09:44:14 -04:00
Dzmitry Malyshau
0de28d1656 [msl] operators, array access, and built-in calls 2020-03-15 23:59:49 -04:00
Dzmitry Malyshau
c467693253 Add quad -> MSL testing 2020-03-15 12:10:19 -04:00
Dzmitry Malyshau
1957b09c4d Add WGSL parsing tests 2020-03-15 11:43:08 -04:00