WGSL: Migrate access control to var<> Spec change: https://github.com/gpuweb/gpuweb/pull/1735 Bug: tint:846 Change-Id: Id2eddc4e8f3bdb86027db8d61bb96b9b8ef9778f Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/53386 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Ben Clayton <bclayton@google.com>
diff --git a/src/tests/end2end/GpuMemorySynchronizationTests.cpp b/src/tests/end2end/GpuMemorySynchronizationTests.cpp index 1db5400..7113a13 100644 --- a/src/tests/end2end/GpuMemorySynchronizationTests.cpp +++ b/src/tests/end2end/GpuMemorySynchronizationTests.cpp
@@ -39,7 +39,7 @@ [[block]] struct Data { a : i32; }; - [[group(0), binding(0)]] var<storage> data : [[access(read_write)]] Data; + [[group(0), binding(0)]] var<storage, read_write> data : Data; [[stage(compute)]] fn main() { data.a = data.a + 1; })"); @@ -66,7 +66,7 @@ [[block]] struct Data { i : i32; }; - [[group(0), binding(0)]] var<storage> data : [[access(read_write)]] Data; + [[group(0), binding(0)]] var<storage, read_write> data : Data; [[stage(fragment)]] fn main() -> [[location(0)]] vec4<f32> { data.i = data.i + 1; return vec4<f32>(f32(data.i) / 255.0, 0.0, 0.0, 1.0); @@ -255,7 +255,7 @@ sampledOut: u32; storageOut: u32; }; - [[group(0), binding(0)]] var<storage> output : [[access(write)]] Output; + [[group(0), binding(0)]] var<storage, write> output : Output; [[group(0), binding(1)]] var sampledTex : texture_2d<u32>; [[group(0), binding(2)]] var storageTex : texture_storage_2d<r32uint, read>; @@ -315,7 +315,7 @@ [[block]] struct Data { a : f32; }; - [[group(0), binding(0)]] var<storage> data : [[access(read_write)]] Data; + [[group(0), binding(0)]] var<storage, read_write> data : Data; [[stage(compute)]] fn main() { data.a = 1.0; })"); @@ -512,12 +512,12 @@ [[block]] struct VBContents { pos : array<vec4<f32>, 4>; }; - [[group(0), binding(0)]] var<storage> vbContents : [[access(read_write)]] VBContents; + [[group(0), binding(0)]] var<storage, read_write> vbContents : VBContents; [[block]] struct IBContents { indices : array<vec4<i32>, 2>; }; - [[group(0), binding(1)]] var<storage> ibContents : [[access(read_write)]] IBContents; + [[group(0), binding(1)]] var<storage, read_write> ibContents : IBContents; // TODO(crbug.com/tint/386): Use the same struct. [[block]] struct ColorContents1 { @@ -526,8 +526,8 @@ [[block]] struct ColorContents2 { color : f32; }; - [[group(0), binding(2)]] var<storage> uniformContents : [[access(read_write)]] ColorContents1; - [[group(0), binding(3)]] var<storage> storageContents : [[access(read_write)]] ColorContents2; + [[group(0), binding(2)]] var<storage, read_write> uniformContents : ColorContents1; + [[group(0), binding(3)]] var<storage, read_write> storageContents : ColorContents2; [[stage(compute)]] fn main() { vbContents.pos[0] = vec4<f32>(-1.0, 1.0, 0.0, 1.0); @@ -581,7 +581,7 @@ }; [[group(0), binding(0)]] var<uniform> uniformBuffer : Buf; - [[group(0), binding(1)]] var<storage> storageBuffer : [[access(read)]] Buf; + [[group(0), binding(1)]] var<storage, read> storageBuffer : Buf; [[stage(fragment)]] fn main() -> [[location(0)]] vec4<f32> { return vec4<f32>(uniformBuffer.color, storageBuffer.color, 0.0, 1.0); @@ -642,7 +642,7 @@ [[align(256)]] color1 : f32; }; - [[group(0), binding(0)]] var<storage> contents : [[access(read_write)]] Contents; + [[group(0), binding(0)]] var<storage, read_write> contents : Contents; [[stage(compute)]] fn main() { contents.pos[0] = vec4<f32>(-1.0, 1.0, 0.0, 1.0); @@ -696,7 +696,7 @@ color : f32; }; [[group(0), binding(0)]] var<uniform> uniformBuffer : Buf; - [[group(0), binding(1)]] var<storage> storageBuffer : [[access(read)]] Buf; + [[group(0), binding(1)]] var<storage, read> storageBuffer : Buf; [[stage(fragment)]] fn main() -> [[location(0)]] vec4<f32> { return vec4<f32>(uniformBuffer.color, storageBuffer.color, 0.0, 1.0);