From 3f6bb08d0093e48e108f2cf48b0561fc0c21e5ae Mon Sep 17 00:00:00 2001 From: dan sinclair Date: Wed, 21 Oct 2020 06:59:51 +0000 Subject: [PATCH] Update WGSL struct syntax. This CL updates the Dawn tests to use the new WGSL struct syntax. Bug: tint:175 Change-Id: I7ce43385f9107f1a133117c41325a344d2241657 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30640 Commit-Queue: Corentin Wallez Reviewed-by: Corentin Wallez --- src/tests/end2end/EntryPointTests.cpp | 2 +- .../unittests/validation/GetBindGroupLayoutValidationTests.cpp | 2 +- .../unittests/validation/RenderPipelineValidationTests.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tests/end2end/EntryPointTests.cpp b/src/tests/end2end/EntryPointTests.cpp index 619999b418..6426d85c5d 100644 --- a/src/tests/end2end/EntryPointTests.cpp +++ b/src/tests/end2end/EntryPointTests.cpp @@ -121,7 +121,7 @@ TEST_P(EntryPointTests, TwoComputeInModule) { DAWN_SKIP_TEST_IF(IsVulkan()); wgpu::ShaderModule module = utils::CreateShaderModuleFromWGSL(device, R"( - type Data = [[block]] struct { + [[block]] struct Data { [[offset(0)]] data : u32; }; [[binding(0), set(0)]] var data : Data; diff --git a/src/tests/unittests/validation/GetBindGroupLayoutValidationTests.cpp b/src/tests/unittests/validation/GetBindGroupLayoutValidationTests.cpp index 6138838ace..f73a2277b8 100644 --- a/src/tests/unittests/validation/GetBindGroupLayoutValidationTests.cpp +++ b/src/tests/unittests/validation/GetBindGroupLayoutValidationTests.cpp @@ -830,7 +830,7 @@ TEST_F(GetBindGroupLayoutTests, Reflection) { // TODO(dawn:216): Re-enable when we correctly reflect which bindings are used for an entryPoint. TEST_F(GetBindGroupLayoutTests, DISABLED_FromCorrectEntryPoint) { wgpu::ShaderModule module = utils::CreateShaderModuleFromWGSL(device, R"( - type Data = [[block]] struct { + [[block]] struct Data { [[offset 0]] data : f32; }; [[binding 0, set 0]] var data0 : Data; diff --git a/src/tests/unittests/validation/RenderPipelineValidationTests.cpp b/src/tests/unittests/validation/RenderPipelineValidationTests.cpp index 3d42cbe7bc..13c316e933 100644 --- a/src/tests/unittests/validation/RenderPipelineValidationTests.cpp +++ b/src/tests/unittests/validation/RenderPipelineValidationTests.cpp @@ -744,7 +744,7 @@ TEST_F(RenderPipelineValidationTest, DISABLED_BindingsFromCorrectEntryPoint) { DAWN_SKIP_TEST_IF(!HasWGSL()); wgpu::ShaderModule module = utils::CreateShaderModuleFromWGSL(device, R"( - type Uniforms = [[block]] struct { + [[block]] struct Uniforms { [[offset 0]] data : vec4; }; [[binding 0, set 0]] var var0 : Uniforms;