Commit Graph
423 Commits
Author SHA1 Message Date
Frizi 337014786c [wgsl-in] use AccessIndex for accesses using constant index 2021-06-17 11:34:58 -04:00
Gordon-F 96b37aff1f [hlsl-out] Reduce heap allocation 2021-06-16 14:03:50 -04:00
Gordon-F 92a11d0978 [hlsl-out] More improvements. Enable quad snapshot testing 2021-06-15 21:08:05 -04:00
Gordon-F 7430a43c36 [wgsl-out] Write constant names with namer 2021-06-15 21:08:05 -04:00
Gordon-F d1f9575ed1 [glsl-out] Write space after if keyword 2021-06-15 21:08:05 -04:00
Gordon-F 54d7d7d2a3 Improve hlsl-out 2021-06-13 11:15:42 -04:00
Igor Shaposhnik 54af830855 Fix nightly clippy suggestions 2021-06-09 10:17:20 -04:00
João Capucho be2231f6d9 [wgsl-out] Write global initializers 2021-06-09 10:14:46 -04:00
Dzmitry Malyshau 38f6a79917 [spv-out] fix image sampling ops, add more tests 2021-06-08 17:38:42 -04:00
Igor Shaposhnik b299a59bb5 [wgsl-out] Simplify code for writing named expression 2021-06-08 17:38:14 -04:00
Igor Shaposhnik 4af035edb7 [glsl-out] Simplify code for writing named expression 2021-06-08 17:38:14 -04:00
Igor Shaposhnik 575304a50c [msl-out] Implement named expression generation (#957) 2021-06-08 12:09:46 -04:00
Jim Blandy 9dcfe8fa4b [spv-out]: Don't have write_expression_pointer return a storage class. (#958)
Nobody uses that value. This lets us simplify `GlobalVariable` and
`write_global_variable` as well.
2021-06-08 10:16:10 -04:00
Igor Shaposhnik be6a4172c5 Fix Expression::Load generating (#925)
* [glsl-out] Fix writing named expressions with array types

* [wgsl-out] Remove unsupported builtin from baked expression

* [glsl-out] Add a newline between globals for readability

* Set bake_ref_count to 1 for Expression::Load

* Update snapshot data
2021-06-08 10:15:26 -04:00
Jim Blandy a2a35f2eb3 Permit dynamic indexing of arrays and matrices only behind a pointer. (#949)
This makes Naga IR validation impose the restrictions added to WGSL in
gpuweb/gpuweb#1801.

Remove code in the SPIR-V writer to spill arrays to temporary variables in order
to index them dynamically. If such IR is encountered, treat it as a failure of
validation.
2021-06-04 12:57:20 -04:00
Gordon-F 90c2cf6aa6 Add ability to generate named expressions 2021-06-03 10:40:59 -04:00
Frizi 2295508f0e Insert attribute glsl location qualifier for opengl ES 3.0 2021-06-02 12:36:04 -04:00
Dzmitry Malyshau d3fbb30d46 [wgsl-out] Improve texture sampling call 2021-05-28 22:43:39 -04:00
Dzmitry Malyshau 1366546645 [glsl-out] improve array types 2021-05-28 22:18:51 -04:00
Jim Blandy 14908e5126 [spv-out]: Don't pass in the type arena where it's not needed. 2021-05-28 00:47:25 -04:00
Jim Blandy ad550addb8 [spv-out] Take advantage of use abbreviation. 2021-05-21 23:04:27 -04:00
Igor Shaposhnik 3dd9cc0c66 [wgsl-out] Skip access to unsupported builtin inside Store statement 2021-05-21 11:03:05 -04:00
Gordon-F 12e6dc5917 [wgsl-out] Implement all statements and expressions. Enable all wgsl-in tests 2021-05-19 14:11:05 -04:00
Dzmitry Malyshau 6c1832c8ee [spv-out] be smarter about deriving capabilities, auto derive them for tests 2021-05-19 02:01:25 -04:00
Gordon-F 6b3db1f487 [glsl-out] Write vector access as a swizzle 2021-05-19 00:09:12 -04:00
Jim Blandy 8246287561 [dot-out] Take advantage of Cow's implementation of From<String>. 2021-05-18 13:35:59 -04:00
Gordon-F b4aa966575 [wgsl-out] Create baking expression for texture function 2021-05-18 13:33:25 -04:00
Dzmitry Malyshau 96ec0b61e7 Snapshot for built-ins 2021-05-18 10:01:14 -04:00
Dzmitry Malyshau 8b60171403 [glsl-out] emit sample variables extension 2021-05-18 10:01:14 -04:00
Dzmitry Malyshau b191c982ec Remove alignment from struct IR 2021-05-17 09:32:52 -04:00
Gordon-F 6efe347e90 [wgsl-out] Implement all math functions. Rename entry point function based on stage. Rename entry point output struct. 2021-05-14 18:14:23 -04:00
Gordon-F 5958f98489 [wgsl-out] Enable snapshot testing for wgsl-in image test 2021-05-14 18:12:02 -04:00
Dzmitry Malyshau a8df6a2b34 [msl] make sizes buffer local to each function 2021-05-13 22:02:37 -04:00
Dzmitry Malyshau 0250ffe2fb [msl] early out if the binding sizes are missing 2021-05-13 00:42:15 -04:00
Igor Shaposhnik 6a42e4a0f8 [wgsl-out] Enable snapshot testing for spv-in quad shader 2021-05-12 15:15:50 -04:00
Dzmitry Malyshau ba422f10f8 [msl] fix splat namespace 2021-05-08 22:07:13 -04:00
Dzmitry Malyshau 350ceb383d WGSL support for f64, snapshot test for it 2021-05-08 21:20:23 -04:00
Dzmitry Malyshau 59d1dcab5b Support width changes in As expression 2021-05-08 21:20:23 -04:00
Gordon-F 53fe7a329f [glsl-out] Handle uninitialized global variables 2021-05-08 21:09:11 -04:00
Gordon-F 73b20ffa70 Add CullDistance BuiltIn 2021-05-08 09:51:14 -04:00
Dzmitry Malyshau bbb1b6b366 [msl] move Compose into a helper method 2021-05-07 01:21:55 -04:00
Dzmitry Malyshau 10c4c906da [msl] move ArrayLength logic out 2021-05-07 01:21:55 -04:00
Dzmitry Malyshau 09032695b0 Barrier follow-up fixes 2021-05-06 14:48:55 -04:00
Dzmitry Malyshau 84eac75f71 Fix new clippy errors 2021-05-06 12:38:34 -04:00
Dzmitry Malyshau 63afb9a215 Add Capabilities bitset for validation 2021-05-05 21:39:41 -04:00
Gordon-F 3a0f014411 [glsl-out] Add clip distance feature 2021-05-05 15:16:42 -04:00
Dzmitry Malyshau be00a05fa5 [spv-in] default output builtins 2021-05-04 22:54:33 -04:00
Dzmitry Malyshau 9fe75ed7f1 Barriers 2021-05-04 22:16:24 -04:00
Ashley 3ffc361724 [spv-in,spv-out] Handle outer product 2021-05-04 15:37:06 -04:00
Lachlan Sneff f6da21f8dd Unify back::msl push constants map and sizes buffer (#825)
* Unify back::msl push constants map and sizes buffer

* Fix clippy warning

* Actually remove PushConstantsMap

* Update snapshots
2021-05-03 21:51:44 -04:00