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
Gordon-F
dbfc11a196
[glsl-out] Fix writing identifiers starting with gl_
2021-05-03 21:47:16 -04:00
Dzmitry Malyshau
bb7ebed23a
[spv-in] null initialization for matrices
2021-05-03 00:55:47 -04:00
Gordon-F
3537bffad3
[glsl-out] Fix scalar arrays writing
2021-05-02 23:51:49 -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
fd561da44c
[msl] derive access qualifier based on the global variable flags ( #798 )
2021-04-28 20:37:42 -04:00