Add a new type, `Input`, representing a particular Naga input file,
with methods to generate related paths - output files with a
particular extension, parameter files, and the input file itself.
Use this throughout `snapshots.rs` to generate paths.
Give `Input` utility methods for reading and writing files.
Add a new Naga feature, `"compact"`, which adds a new function
`naga::compact::compact`, which removes unused expressions, types, and
constants from a `Module`.
* Support buffer resource arrays in IR, wgsl-in, and spv-out
* spv-out: refactor non-uniform indexing semantics to support buffers
* Update the doc comment on BindingArray type
* Improve TypeInfo restrictions on binding arrays
* Strip DATA out of binding arrays
* Include suggested documentation, more binding array tests, enforce structs
We currently assume that we are using raw `RWByteAddressBuffer` methods for all atomic operations (`<pointer>.Interlocked<op>(<raw_byte_offset>, …)`), which is only true when we use `var<storage, read_write>` globals. For `var<workgroup>` globals, we need `Interlocked<op>(<pointer>, …)`, using the original expression as the first argument.
Fix this by branching on the `pointer`'s address space in `Atomic` statements, and implementing the workgroup address space case with intrinsics.
Remove atomic ops from `access`, add new `atomicOps` test.
Fixes#2284
* Fix invalid spirv generation in int dotprod
constants cannot be declared inside of a function block, so instead use `write_constant_null` to produce a correctly-declared constant 0.
* autogenerated test snapshots
* [spirv-out] Fix adding illegal decorators on fragment outputs.
Furthermore, fix allowing to add `Centroid` and `Sample` decorator to vertex inputs.
Fixes#2270
* Add test for fragment outputs
* Fix fragment-output.wgsl test using more than 8 outputs in a single shader
Breaks HLSL & MSL validation
* formatting
Use the local (not global) invocation id to decide which invocation should do the initialization, so that every workgroup gets initialized, not just the first.
arrays can be put behind pointers in inout and out parameters in GLSL and HLSL,
whose dimensions must be specified to let array access
compile. so, we specify their dimensions.
fixes#2248
- The Typifier was updated to expect `uint`
- Both `glsl` and `spv` frontends where updated to cast the result to `sint`.
- Both `glsl` and `spv` backends where updated to cast the result to `uint`.
- Remove cast in `msl` backend.