Add optional access to ptr<>

This also completes the work to resolve the access controls for each
storage type.

Fixed: tint:846
Change-Id: Iab24057ec14620a2978ec63c4a91ba12d1bc6e9b
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/53381
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: James Price <jrprice@google.com>
diff --git a/test/array/assign_to_storage_var.wgsl.expected.spvasm b/test/array/assign_to_storage_var.wgsl.expected.spvasm
index 67fa25e..1764efa 100644
--- a/test/array/assign_to_storage_var.wgsl.expected.spvasm
+++ b/test/array/assign_to_storage_var.wgsl.expected.spvasm
@@ -27,6 +27,7 @@
                OpDecorate %_arr_int_uint_4 ArrayStride 16
                OpDecorate %S Block
                OpMemberDecorate %S 0 Offset 0
+               OpDecorate %src_uniform NonWritable
                OpDecorate %src_uniform DescriptorSet 0
                OpDecorate %src_uniform Binding 0
                OpDecorate %src_storage DescriptorSet 0