tint: Disallow write-only storage buffers

These have not been in the spec for a long time. The read_write access
mode can be used instead.

Fixed: tint:1342
Change-Id: I01ffc343d2d2f9df9d7028bba4548c749616c65c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/93500
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
This commit is contained in:
dan sinclair
2022-07-04 15:17:00 +00:00
committed by Dawn LUCI CQ
parent 3b800578b5
commit 5286ea9d16
34 changed files with 83 additions and 68 deletions

View File

@@ -15,7 +15,7 @@ struct S {
j : array<Inner, 4>,
};
@binding(0) @group(0) var<storage, write> s : S;
@binding(0) @group(0) var<storage, read_write> s : S;
@compute @workgroup_size(1)
fn main() {

View File

@@ -39,7 +39,6 @@
OpMemberDecorate %Inner 0 Offset 0
OpMemberDecorate %S 9 Offset 108
OpDecorate %_arr_Inner_uint_4 ArrayStride 4
OpDecorate %s NonReadable
OpDecorate %s Binding 0
OpDecorate %s DescriptorSet 0
%int = OpTypeInt 32 1

View File

@@ -15,7 +15,7 @@ struct S {
j : array<Inner, 4>,
}
@binding(0) @group(0) var<storage, write> s : S;
@binding(0) @group(0) var<storage, read_write> s : S;
@compute @workgroup_size(1)
fn main() {