diff --git a/src/tests/end2end/BindGroupTests.cpp b/src/tests/end2end/BindGroupTests.cpp index 155bd25b61..fbe6e523f3 100644 --- a/src/tests/end2end/BindGroupTests.cpp +++ b/src/tests/end2end/BindGroupTests.cpp @@ -1205,7 +1205,7 @@ TEST_P(BindGroupTests, ReallyLargeBindGroup) { bgEntries.push_back({nullptr, binding, nullptr, 0, 0, nullptr, texture.CreateView()}); interface << "[[group(0), binding(" << binding++ << ")]] " - << "var image" << i << " : [[access(read)]] texture_storage_2d;\n"; + << "var image" << i << " : texture_storage_2d;\n"; body << "if (textureLoad(image" << i << ", vec2(0, 0)).r != " << expectedValue++ << "u) {\n"; diff --git a/src/tests/end2end/BufferZeroInitTests.cpp b/src/tests/end2end/BufferZeroInitTests.cpp index d2ef631f89..7d78ec4388 100644 --- a/src/tests/end2end/BufferZeroInitTests.cpp +++ b/src/tests/end2end/BufferZeroInitTests.cpp @@ -425,7 +425,7 @@ class BufferZeroInitTest : public DawnTest { // As long as the comptue shader is executed once, the pixel color of outImage will be set // to red. const char* computeShader = R"( - [[group(0), binding(0)]] var outImage : [[access(write)]] texture_storage_2d; + [[group(0), binding(0)]] var outImage : texture_storage_2d; [[stage(compute)]] fn main() { textureStore(outImage, vec2(0, 0), vec4(1.0, 0.0, 0.0, 1.0)); @@ -997,7 +997,7 @@ TEST_P(BufferZeroInitTest, BoundAsUniformBuffer) { value : vec4; }; [[group(0), binding(0)]] var ubo : UBO; - [[group(0), binding(1)]] var outImage : [[access(write)]] texture_storage_2d; + [[group(0), binding(1)]] var outImage : texture_storage_2d; [[stage(compute)]] fn main() { if (all(ubo.value == vec4(0u, 0u, 0u, 0u))) { @@ -1036,7 +1036,7 @@ TEST_P(BufferZeroInitTest, BoundAsReadonlyStorageBuffer) { value : vec4; }; [[group(0), binding(0)]] var ssbo : [[access(read_write)]] SSBO; - [[group(0), binding(1)]] var outImage : [[access(write)]] texture_storage_2d; + [[group(0), binding(1)]] var outImage : texture_storage_2d; [[stage(compute)]] fn main() { if (all(ssbo.value == vec4(0u, 0u, 0u, 0u))) { @@ -1075,7 +1075,7 @@ TEST_P(BufferZeroInitTest, BoundAsStorageBuffer) { value : array, 2>; }; [[group(0), binding(0)]] var ssbo : [[access(read_write)]] SSBO; - [[group(0), binding(1)]] var outImage : [[access(write)]] texture_storage_2d; + [[group(0), binding(1)]] var outImage : texture_storage_2d; [[stage(compute)]] fn main() { if (all(ssbo.value[0] == vec4(0u, 0u, 0u, 0u)) && diff --git a/src/tests/end2end/GpuMemorySynchronizationTests.cpp b/src/tests/end2end/GpuMemorySynchronizationTests.cpp index 05523e2a0d..1db5400ff1 100644 --- a/src/tests/end2end/GpuMemorySynchronizationTests.cpp +++ b/src/tests/end2end/GpuMemorySynchronizationTests.cpp @@ -257,7 +257,7 @@ TEST_P(GpuMemorySyncTests, SampledAndROStorageTextureInComputePass) { }; [[group(0), binding(0)]] var output : [[access(write)]] Output; [[group(0), binding(1)]] var sampledTex : texture_2d; - [[group(0), binding(2)]] var storageTex : [[access(read)]] texture_storage_2d; + [[group(0), binding(2)]] var storageTex : texture_storage_2d; [[stage(compute)]] fn main() { output.sampledOut = textureLoad(sampledTex, vec2(0, 0), 0).x; diff --git a/src/tests/end2end/StorageTextureTests.cpp b/src/tests/end2end/StorageTextureTests.cpp index 81126c1ea4..bdc0fbf007 100644 --- a/src/tests/end2end/StorageTextureTests.cpp +++ b/src/tests/end2end/StorageTextureTests.cpp @@ -982,8 +982,8 @@ TEST_P(StorageTextureTests, ReadonlyAndWriteonlyStorageTexturePingPong) { kTextureFormat, wgpu::TextureUsage::Storage | wgpu::TextureUsage::CopySrc, 1u, 1u); wgpu::ShaderModule module = utils::CreateShaderModule(device, R"( -[[group(0), binding(0)]] var Src : [[access(read)]] texture_storage_2d; -[[group(0), binding(1)]] var Dst : [[access(write)]] texture_storage_2d; +[[group(0), binding(0)]] var Src : texture_storage_2d; +[[group(0), binding(1)]] var Dst : texture_storage_2d; [[stage(compute)]] fn main() { var srcValue : vec4 = textureLoad(Src, vec2(0, 0)); srcValue.x = srcValue.x + 1u; @@ -1057,7 +1057,7 @@ TEST_P(StorageTextureTests, SampledAndWriteonlyStorageTexturePingPong) { kTextureFormat, wgpu::TextureUsage::Sampled | wgpu::TextureUsage::Storage, 1u, 1u); wgpu::ShaderModule module = utils::CreateShaderModule(device, R"( [[group(0), binding(0)]] var Src : texture_2d; -[[group(0), binding(1)]] var Dst : [[access(write)]] texture_storage_2d; +[[group(0), binding(1)]] var Dst : texture_storage_2d; [[stage(compute)]] fn main() { var srcValue : vec4 = textureLoad(Src, vec2(0, 0), 0); srcValue.x = srcValue.x + 1u; @@ -1155,13 +1155,13 @@ fn doTest() -> bool { })"; const char* kCommonWriteOnlyZeroInitTestCodeFragment = R"( -[[group(0), binding(0)]] var dstImage : [[access(write)]] texture_storage_2d; +[[group(0), binding(0)]] var dstImage : texture_storage_2d; [[stage(fragment)]] fn main() { textureStore(dstImage, vec2(0, 0), vec4(1u, 0u, 0u, 1u)); })"; const char* kCommonWriteOnlyZeroInitTestCodeCompute = R"( -[[group(0), binding(0)]] var dstImage : [[access(write)]] texture_storage_2d; +[[group(0), binding(0)]] var dstImage : texture_storage_2d; [[stage(compute)]] fn main() { textureStore(dstImage, vec2(0, 0), vec4(1u, 0u, 0u, 1u)); @@ -1178,7 +1178,7 @@ TEST_P(StorageTextureZeroInitTests, ReadonlyStorageTextureClearsToZeroInRenderPa // green as the output color, otherwise uses red instead. const char* kVertexShader = kSimpleVertexShader; const std::string kFragmentShader = std::string(R"( -[[group(0), binding(0)]] var srcImage : [[access(read)]] texture_storage_2d; +[[group(0), binding(0)]] var srcImage : texture_storage_2d; )") + kCommonReadOnlyZeroInitTestCode + R"( [[stage(fragment)]] fn main() -> [[location(0)]] vec4 { @@ -1203,7 +1203,7 @@ TEST_P(StorageTextureZeroInitTests, ReadonlyStorageTextureClearsToZeroInComputeP result : u32; }; -[[group(0), binding(0)]] var srcImage : [[access(read)]] texture_storage_2d; +[[group(0), binding(0)]] var srcImage : texture_storage_2d; [[group(0), binding(1)]] var dstBuffer : [[access(read_write)]] DstBuffer; )") + kCommonReadOnlyZeroInitTestCode + R"( [[stage(compute)]] fn main() { diff --git a/src/tests/unittests/validation/ResourceUsageTrackingTests.cpp b/src/tests/unittests/validation/ResourceUsageTrackingTests.cpp index a1ed2ea156..142ba56aa7 100644 --- a/src/tests/unittests/validation/ResourceUsageTrackingTests.cpp +++ b/src/tests/unittests/validation/ResourceUsageTrackingTests.cpp @@ -1508,7 +1508,7 @@ namespace { })"); wgpu::ShaderModule fsModule = utils::CreateShaderModule(device, R"( - [[group(0), binding(0)]] var tex : [[access(read)]] texture_storage_2d; + [[group(0), binding(0)]] var tex : texture_storage_2d; [[stage(fragment)]] fn main() { })"); utils::ComboRenderPipelineDescriptor pipelineDescriptor; diff --git a/src/tests/unittests/validation/StorageTextureValidationTests.cpp b/src/tests/unittests/validation/StorageTextureValidationTests.cpp index 6660ca6a1f..5294c0f3f6 100644 --- a/src/tests/unittests/validation/StorageTextureValidationTests.cpp +++ b/src/tests/unittests/validation/StorageTextureValidationTests.cpp @@ -120,7 +120,7 @@ TEST_F(StorageTextureValidationTests, RenderPipeline) { // Readonly storage texture can be declared in a vertex shader. { wgpu::ShaderModule vsModule = utils::CreateShaderModule(device, R"( - [[group(0), binding(0)]] var image0 : [[access(read)]] texture_storage_2d; + [[group(0), binding(0)]] var image0 : texture_storage_2d; [[stage(vertex)]] fn main( [[builtin(vertex_index)]] VertexIndex : u32 ) -> [[builtin(position)]] vec4 { @@ -137,7 +137,7 @@ TEST_F(StorageTextureValidationTests, RenderPipeline) { // Read-only storage textures can be declared in a fragment shader. { wgpu::ShaderModule fsModule = utils::CreateShaderModule(device, R"( - [[group(0), binding(0)]] var image0 : [[access(read)]] texture_storage_2d; + [[group(0), binding(0)]] var image0 : texture_storage_2d; [[stage(fragment)]] fn main( [[builtin(position)]] FragCoord : vec4 ) -> [[location(0)]] vec4 { @@ -154,7 +154,7 @@ TEST_F(StorageTextureValidationTests, RenderPipeline) { // Write-only storage textures cannot be declared in a vertex shader. if ((false) /* TODO(https://crbug.com/tint/449) */) { wgpu::ShaderModule vsModule = utils::CreateShaderModule(device, R"( - [[group(0), binding(0)]] var image0 : [[access(write)]] texture_storage_2d; + [[group(0), binding(0)]] var image0 : texture_storage_2d; [[stage(vertex)]] fn main([[builtin(vertex_index)]] vertex_index : u32) { textureStore(image0, vec2(i32(vertex_index), 0), vec4(1.0, 0.0, 0.0, 1.0)); })"); @@ -169,7 +169,7 @@ TEST_F(StorageTextureValidationTests, RenderPipeline) { // Write-only storage textures can be declared in a fragment shader. { wgpu::ShaderModule fsModule = utils::CreateShaderModule(device, R"( - [[group(0), binding(0)]] var image0 : [[access(write)]] texture_storage_2d; + [[group(0), binding(0)]] var image0 : texture_storage_2d; [[stage(fragment)]] fn main([[builtin(position)]] position : vec4) { textureStore(image0, vec2(position.xy), vec4(1.0, 0.0, 0.0, 1.0)); })"); @@ -188,7 +188,7 @@ TEST_F(StorageTextureValidationTests, ComputePipeline) { // Read-only storage textures can be declared in a compute shader. { wgpu::ShaderModule csModule = utils::CreateShaderModule(device, R"( - [[group(0), binding(0)]] var image0 : [[access(read)]] texture_storage_2d; + [[group(0), binding(0)]] var image0 : texture_storage_2d; [[block]] struct Buf { data : f32; @@ -210,7 +210,7 @@ TEST_F(StorageTextureValidationTests, ComputePipeline) { // Write-only storage textures can be declared in a compute shader. { wgpu::ShaderModule csModule = utils::CreateShaderModule(device, R"( - [[group(0), binding(0)]] var image0 : [[access(write)]] texture_storage_2d; + [[group(0), binding(0)]] var image0 : texture_storage_2d; [[stage(compute)]] fn main([[builtin(local_invocation_id)]] LocalInvocationID : vec3) { textureStore(image0, vec2(LocalInvocationID.xy), vec4(0.0, 0.0, 0.0, 0.0)); @@ -230,7 +230,7 @@ TEST_F(StorageTextureValidationTests, ReadWriteStorageTexture) { // Read-write storage textures cannot be declared in a vertex shader by default. { ASSERT_DEVICE_ERROR(utils::CreateShaderModule(device, R"( - [[group(0), binding(0)]] var image0 : [[access(read_write)]] texture_storage_2d; + [[group(0), binding(0)]] var image0 : texture_storage_2d; [[stage(vertex)]] fn main() { textureDimensions(image0); })")); @@ -239,7 +239,7 @@ TEST_F(StorageTextureValidationTests, ReadWriteStorageTexture) { // Read-write storage textures cannot be declared in a fragment shader by default. { ASSERT_DEVICE_ERROR(utils::CreateShaderModule(device, R"( - [[group(0), binding(0)]] var image0 : [[access(read_write)]] texture_storage_2d; + [[group(0), binding(0)]] var image0 : texture_storage_2d; [[stage(fragment)]] fn main() { textureDimensions(image0); })")); @@ -248,7 +248,7 @@ TEST_F(StorageTextureValidationTests, ReadWriteStorageTexture) { // Read-write storage textures cannot be declared in a compute shader by default. { ASSERT_DEVICE_ERROR(utils::CreateShaderModule(device, R"( - [[group(0), binding(0)]] var image0 : [[access(read_write)]] texture_storage_2d; + [[group(0), binding(0)]] var image0 : texture_storage_2d; [[stage(compute)]] fn main() { textureDimensions(image0); })"));