Add a new Naga feature, `"compact"`, which adds a new function
`naga::compact::compact`, which removes unused expressions, types, and
constants from a `Module`.
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
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