Commit Graph

1911 Commits

Author SHA1 Message Date
Connor Fitzgerald
f0edae8ce9 Update to 0.11 (#2222) naga-cli-v0.11.0 naga-v0.11.0 2023-01-25 21:27:09 +00:00
Teodor Tanasoaia
13944c0ae5 Update CHANGELOG.md 2023-01-25 15:11:16 -05:00
Teodor Tanasoaia
fe9db5dd8d install cargo-tarpaulin via cargo-binstall (#2220) 2023-01-25 18:21:24 +00:00
teoxoy
c7d02151f0 add support for zero-initializing workgroup memory 2023-01-25 18:07:48 +01:00
teoxoy
3ace8b81cb fix array being flagged as constructible when its base isn't 2023-01-25 18:07:48 +01:00
teoxoy
85e3b0844f add type_flags to ModuleInfo 2023-01-25 18:07:48 +01:00
teoxoy
a42857d291 [hlsl-out] simplify write_default_init 2023-01-25 18:07:48 +01:00
teoxoy
e5121ca012 factor out write_barrier functions 2023-01-25 18:07:48 +01:00
Patryk Wychowaniec
954cbaaff3 [spv-in] Support binding arrays (#2199) 2023-01-25 17:49:52 +01:00
Teodor Tanasoaia
f70d8ec51f update test snapshots (#2219) 2023-01-23 11:09:15 +00:00
robtfm
4142971cb1 glsl: include unused items (#2205)
* include_unused_items

* clippy

* tests

* rename original const if possible
2023-01-23 11:58:05 +01:00
Evan Mark Hopkins
a638da9edb [wgsl] Removes isFinite and isNormal 2023-01-23 11:50:50 +01:00
Evan Mark Hopkins
74e5b4a07e [wgsl] Update inverse hyperbolic built-ins 2023-01-23 11:50:50 +01:00
Evan Mark Hopkins
9f182ade30 [wgsl] Add refract built-in 2023-01-23 11:50:50 +01:00
Jonathan Behrens
1be8024bda Support 16-bit unorm/snorm formats (#2210)
* Support 16-bit unorm/snorm formats

* Add Capabilities::STORAGE_TEXTURE_16BIT_NORM_FORMATS

* Add 16-bit normalized formats to spv frontend
2023-01-18 19:03:24 +01:00
Jonathan Behrens
1cffd236a7 Remove overly restrictive array stride check (#2215) 2023-01-18 16:28:38 +01:00
Jim Blandy
cdcfad277a Let the uniformity analysis trust the handle validation pass.
Undo some changes from #1668, now that #2090 has been merged.
2023-01-14 19:25:31 -08:00
Jim Blandy
f0a8ff6b3a Fix docs for Emit statements. (#2208) 2023-01-15 00:00:15 +01:00
SparkyPotato
6035b07b78 [wgsl-in] Implement module-level scoping.
Fixes #1745: Support out-of-order module scope declarations in WGSL
Fixes #1044: Forbid local variable shadowing in WGSL
Fixes #2076: [wgsl-in] no error for duplicated type definition
Fixes #2071: Global item does not support 'const'
Fixes #2105: [wgsl-in] Type aliases for a vecN<T> doesn't work when constructing vec from a single argument
Fixes #1775: Referencing a function without a return type yields an unknown identifier error.
Fixes #2089: Error span reported on the declaration of a variable instead of its use
Fixes #1996: [wgsl-in] Confusing error: "expected unsigned/signed integer literal, found '1'"

Separate parsing from lowering by generating an AST, which desugars as
much as possible down to something like Naga IR. The AST is then used
to resolve identifiers while lowering to Naga IR.

Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>
Co-authored-by: Jim Blandy <jimb@red-bean.com>
2023-01-12 09:37:08 -08:00
Timo de Kort
7effd12596 Update setup-dxc to v1.1.0 (#2204) 2023-01-11 18:23:42 +01:00
Jim Blandy
86a88de396 Revert "Error if the uniformity requirements for a barrier aren't met" (#2203)
This reverts commit e6e94d65ab.
2023-01-11 16:35:03 +01:00
Daniel McNab
e6e94d65ab Error if the uniformity requirements for a barrier aren't met 2023-01-09 16:39:33 -08:00
teoxoy
5b4e94630b [glsl-out] use fma polyfill for versions below gles 320 2023-01-06 17:20:27 -08:00
Rainb0w :3
e98bd9264c [glsl-out] emit reflection info for non-struct uniforms (#2189) 2023-01-04 20:26:52 +01:00
Erich Gubler
224ff3897d build(cli): use conventional bin path for naga-cli 2022-12-27 10:38:37 -08:00
PENGUINLIONG
24316fd4bc Allow u32 coordinates for textureStore/textureLoad (#2172) 2022-12-22 18:59:22 +01:00
Dzmitry Malyshau
02280a7357 msl: handle the case of missing binding (#2175) 2022-12-22 11:21:21 +01:00
Zhixing Zhang
8e1b0529e6 Supporting gl_PointCoord (#2180) 2022-12-21 13:05:15 +01:00
Jim Blandy
37be4df2b8 Fix warnings when building tests without validation. 2022-12-20 22:24:24 -08:00
Erich Gubler
461fdda425 Add handle validation pass to Validator (#2090)
Before proceeding with any other validation, check that all Handles are valid for their arenas, and refer only to older handles than themselves. This allows subsequent stages to simply use indexing without panics, assuming validation has passed.
2022-12-17 00:26:43 +00:00
Erich Gubler
420c9845f8 refactor: resolve clippy::manual_clamp 2022-12-15 11:20:47 -08:00
Erich Gubler
3c26ffb07a fix(docs): fix invalid <...> URLs with code spans 2022-12-15 11:20:47 -08:00
Dzmitry Malyshau
76d30e5055 Add ValidationFlags::BINDINGS 2022-12-13 12:59:28 -05:00
Avi Weinstock
5d8fc3fdcf [wgsl-in/spv-out] Add support for WGSL's atomicCompareExchangeWeak (#2165)
* Add support for WGSL's `atomicCompareExchangeWeak` with the `__atomic_compare_exchange_result` struct, and add SPIR-V codegen for it.

Partially addresses https://github.com/gpuweb/gpuweb/pull/2113, #1755.

* Add tests for `atomicCompareExchangeWeak`, and support both u32 and i32 atomics with it.

* More thorough typechecking of the struct returned by `atomicCompareExchangeWeak`.
2022-12-13 10:47:28 +01:00
teoxoy
8f1d82f0d2 [wgsl] update reserved keywords 2022-12-12 16:54:21 -08:00
Teodor Tanasoaia
9a00937b50 fix-fmt 2022-12-12 09:46:38 -08:00
Teodor Tanasoaia
300ffcafbf update error note 2022-12-12 09:46:38 -08:00
Teodor Tanasoaia
ee5c343038 fix tests 2022-12-12 09:46:38 -08:00
Teodor Tanasoaia
36bae0760d remove non-32bit integers 2022-12-12 09:46:38 -08:00
Teodor Tanasoaia
4748721857 remove comment 2022-12-12 09:33:24 -08:00
Teodor Tanasoaia
bf71b015a1 [wgsl-out] remove workgroup_size builtin 2022-12-12 09:33:24 -08:00
Teodor Tanasoaia
e671d6b49c [wgsl-in] remove workgroup_size builtin 2022-12-12 09:33:24 -08:00
robtfm
2dcb6963fa add Range::new_from_bounds 2022-12-12 11:57:23 +01:00
Jim Blandy
0197246365 Ignore unused_imports in tests/snapshots.rs.
This is for the same reason that we ignore `dead_code`:

    // A lot of the code can be unused based on configuration flags,
    // the corresponding warnings aren't helpful.
2022-12-12 11:14:17 +01:00
Jonathan Behrens
4f77cbafb7 [wgsl-out] Write correct scalar kind when width != 4 (#1514)
* [wgsl-out] Write correct scalar kind when width != 4

* slight refactoring

* Also handle matrix scalar widths

* Fix formatting
2022-12-12 10:56:28 +01:00
teoxoy
5a1f43d12d [doc] add more switch docs 2022-12-09 10:21:58 -08:00
teoxoy
63e85b4b15 [doc] explain how case clauses with multiple selectors are supported 2022-12-09 10:21:58 -08:00
teoxoy
f36adeefaa [glsl-out] introduce a new block for switch cases 2022-12-09 10:21:58 -08:00
teoxoy
eccdc0aeb1 [spv-out] omit extra switch case blocks where possible 2022-12-09 10:21:58 -08:00
teoxoy
be70a2ec03 [spv-out] fix switch cases after default not being output 2022-12-09 10:21:58 -08:00